@@ -21,38 +21,24 @@ LL | writeln!("{}_{}", "{} {}", x, y);
21
21
| ++++++++
22
22
23
23
error[E0599]: cannot write into `&'static str`
24
- --> $DIR/missing-writer.rs:5:12
24
+ --> $DIR/missing-writer.rs:5:5
25
25
|
26
26
LL | write!("{}_{}", x, y);
27
- | ------- ^^^^^^^------- method not found in `&str`
27
+ | ^^^^^^^^^^^^^^^^^^^^^
28
28
|
29
- note: must implement `io::Write`, `fmt::Write`, or have a `write_fmt` method
30
- --> $DIR/missing-writer.rs:5:12
31
- |
32
- LL | write!("{}_{}", x, y);
33
- | ^^^^^^^
34
- help: a writer is needed before this format string
35
- --> $DIR/missing-writer.rs:5:12
36
- |
37
- LL | write!("{}_{}", x, y);
38
- | ^
29
+ = note: type does not implement the `write_fmt` method
30
+ = help: try adding `use std::fmt::Write;` or `use std::io::Write;` to bring the appropriate trait into scope
31
+ = note: this error originates in the macro `write` (in Nightly builds, run with -Z macro-backtrace for more info)
39
32
40
33
error[E0599]: cannot write into `&'static str`
41
- --> $DIR/missing-writer.rs:11:14
34
+ --> $DIR/missing-writer.rs:11:5
42
35
|
43
36
LL | writeln!("{}_{}", x, y);
44
- | --------- ^^^^^^^------- method not found in `&str`
37
+ | ^^^^^^^^^^^^^^^^^^^^^^^
45
38
|
46
- note: must implement `io::Write`, `fmt::Write`, or have a `write_fmt` method
47
- --> $DIR/missing-writer.rs:11:14
48
- |
49
- LL | writeln!("{}_{}", x, y);
50
- | ^^^^^^^
51
- help: a writer is needed before this format string
52
- --> $DIR/missing-writer.rs:11:14
53
- |
54
- LL | writeln!("{}_{}", x, y);
55
- | ^
39
+ = note: type does not implement the `write_fmt` method
40
+ = help: try adding `use std::fmt::Write;` or `use std::io::Write;` to bring the appropriate trait into scope
41
+ = note: this error originates in the macro `writeln` (in Nightly builds, run with -Z macro-backtrace for more info)
56
42
57
43
error: aborting due to 4 previous errors
58
44
0 commit comments