@@ -5,18 +5,13 @@ LL | let fp = BufWriter::new(fp);
5
5
| ^^ the trait `std::io::Write` is not implemented for `&dyn std::io::Write`
6
6
|
7
7
= note: `std::io::Write` is implemented for `&mut dyn std::io::Write`, but not for `&dyn std::io::Write`
8
- = note: required by `BufWriter::<W>::new`
8
+ = note: required by `std::io:: BufWriter::<W>::new`
9
9
10
10
error[E0277]: the trait bound `&dyn std::io::Write: std::io::Write` is not satisfied
11
11
--> $DIR/mut-borrow-needed-by-trait.rs:17:14
12
12
|
13
13
LL | let fp = BufWriter::new(fp);
14
14
| ^^^^^^^^^^^^^^ the trait `std::io::Write` is not implemented for `&dyn std::io::Write`
15
- |
16
- ::: $SRC_DIR/std/src/io/buffered.rs:LL:COL
17
- |
18
- LL | pub struct BufWriter<W: Write> {
19
- | ----- required by this bound in `BufWriter`
20
15
|
21
16
= note: `std::io::Write` is implemented for `&mut dyn std::io::Write`, but not for `&dyn std::io::Write`
22
17
@@ -25,28 +20,18 @@ error[E0277]: the trait bound `&dyn std::io::Write: std::io::Write` is not satis
25
20
|
26
21
LL | let fp = BufWriter::new(fp);
27
22
| ^^^^^^^^^^^^^^^^^^ the trait `std::io::Write` is not implemented for `&dyn std::io::Write`
28
- |
29
- ::: $SRC_DIR/std/src/io/buffered.rs:LL:COL
30
- |
31
- LL | pub struct BufWriter<W: Write> {
32
- | ----- required by this bound in `BufWriter`
33
23
|
34
24
= note: `std::io::Write` is implemented for `&mut dyn std::io::Write`, but not for `&dyn std::io::Write`
35
25
36
- error[E0599]: no method named `write_fmt` found for struct `BufWriter<&dyn std::io::Write>` in the current scope
26
+ error[E0599]: no method named `write_fmt` found for struct `std::io:: BufWriter<&dyn std::io::Write>` in the current scope
37
27
--> $DIR/mut-borrow-needed-by-trait.rs:22:5
38
28
|
39
- LL | writeln!(fp, "hello world").unwrap();
40
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ method not found in `BufWriter<&dyn std::io::Write>`
41
- |
42
- ::: $SRC_DIR/std/src/io/buffered.rs:LL:COL
43
- |
44
- LL | pub struct BufWriter<W: Write> {
45
- | ------------------------------ doesn't satisfy `BufWriter<&dyn std::io::Write>: std::io::Write`
29
+ LL | writeln!(fp, "hello world").unwrap();
30
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ method not found in `std::io::BufWriter<&dyn std::io::Write>`
46
31
|
47
32
= note: the method `write_fmt` exists but the following trait bounds were not satisfied:
48
33
`&dyn std::io::Write: std::io::Write`
49
- which is required by `BufWriter<&dyn std::io::Write>: std::io::Write`
34
+ which is required by `std::io:: BufWriter<&dyn std::io::Write>: std::io::Write`
50
35
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
51
36
52
37
error: aborting due to 4 previous errors
0 commit comments