File: missing-writer.stderr

package info (click to toggle)
rustc-web 1.78.0%2Bdfsg1-2~deb12u3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,245,420 kB
  • sloc: xml: 147,985; javascript: 18,022; sh: 11,083; python: 10,265; ansic: 6,172; cpp: 5,023; asm: 4,390; makefile: 4,269
file content (59 lines) | stat: -rw-r--r-- 1,704 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
error: format argument must be a string literal
  --> $DIR/missing-writer.rs:5:21
   |
LL |     write!("{}_{}", x, y);
   |                     ^
   |
help: you might be missing a string literal to format with
   |
LL |     write!("{}_{}", "{} {}", x, y);
   |                     ++++++++

error: format argument must be a string literal
  --> $DIR/missing-writer.rs:11:23
   |
LL |     writeln!("{}_{}", x, y);
   |                       ^
   |
help: you might be missing a string literal to format with
   |
LL |     writeln!("{}_{}", "{} {}", x, y);
   |                       ++++++++

error[E0599]: cannot write into `&'static str`
  --> $DIR/missing-writer.rs:5:12
   |
LL |     write!("{}_{}", x, y);
   |     -------^^^^^^^------- method not found in `&str`
   |
note: must implement `io::Write`, `fmt::Write`, or have a `write_fmt` method
  --> $DIR/missing-writer.rs:5:12
   |
LL |     write!("{}_{}", x, y);
   |            ^^^^^^^
help: a writer is needed before this format string
  --> $DIR/missing-writer.rs:5:12
   |
LL |     write!("{}_{}", x, y);
   |            ^

error[E0599]: cannot write into `&'static str`
  --> $DIR/missing-writer.rs:11:14
   |
LL |     writeln!("{}_{}", x, y);
   |     ---------^^^^^^^------- method not found in `&str`
   |
note: must implement `io::Write`, `fmt::Write`, or have a `write_fmt` method
  --> $DIR/missing-writer.rs:11:14
   |
LL |     writeln!("{}_{}", x, y);
   |              ^^^^^^^
help: a writer is needed before this format string
  --> $DIR/missing-writer.rs:11:14
   |
LL |     writeln!("{}_{}", x, y);
   |              ^

error: aborting due to 4 previous errors

For more information about this error, try `rustc --explain E0599`.