2019-10-03 19:10:37 -05:00
|
|
|
error[E0277]: the trait bound `&dyn std::io::Write: std::io::Write` is not satisfied
|
|
|
|
--> $DIR/mut-borrow-needed-by-trait.rs:17:29
|
|
|
|
|
|
|
|
|
LL | let fp = BufWriter::new(fp);
|
|
|
|
| ^^ the trait `std::io::Write` is not implemented for `&dyn std::io::Write`
|
|
|
|
|
|
2019-10-03 19:39:58 -05:00
|
|
|
= note: `std::io::Write` is implemented for `&mut dyn std::io::Write`, but not for `&dyn std::io::Write`
|
2019-10-03 19:10:37 -05:00
|
|
|
= note: required by `std::io::BufWriter::<W>::new`
|
|
|
|
|
|
|
|
error[E0277]: the trait bound `&dyn std::io::Write: std::io::Write` is not satisfied
|
|
|
|
--> $DIR/mut-borrow-needed-by-trait.rs:17:14
|
|
|
|
|
|
|
|
|
LL | let fp = BufWriter::new(fp);
|
|
|
|
| ^^^^^^^^^^^^^^ the trait `std::io::Write` is not implemented for `&dyn std::io::Write`
|
|
|
|
|
|
2019-10-03 19:39:58 -05:00
|
|
|
= note: `std::io::Write` is implemented for `&mut dyn std::io::Write`, but not for `&dyn std::io::Write`
|
2019-10-03 19:10:37 -05:00
|
|
|
= note: required by `std::io::BufWriter`
|
|
|
|
|
|
|
|
error[E0277]: the trait bound `&dyn std::io::Write: std::io::Write` is not satisfied
|
|
|
|
--> $DIR/mut-borrow-needed-by-trait.rs:17:14
|
|
|
|
|
|
|
|
|
LL | let fp = BufWriter::new(fp);
|
|
|
|
| ^^^^^^^^^^^^^^^^^^ the trait `std::io::Write` is not implemented for `&dyn std::io::Write`
|
|
|
|
|
|
2019-10-03 19:39:58 -05:00
|
|
|
= note: `std::io::Write` is implemented for `&mut dyn std::io::Write`, but not for `&dyn std::io::Write`
|
2019-10-03 19:10:37 -05:00
|
|
|
= note: required by `std::io::BufWriter`
|
|
|
|
|
2020-01-08 10:05:31 -06:00
|
|
|
error[E0599]: no method named `write_fmt` found for struct `std::io::BufWriter<&dyn std::io::Write>` in the current scope
|
2019-10-03 19:10:37 -05:00
|
|
|
--> $DIR/mut-borrow-needed-by-trait.rs:22:5
|
|
|
|
|
|
|
|
|
LL | writeln!(fp, "hello world").unwrap();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ method not found in `std::io::BufWriter<&dyn std::io::Write>`
|
|
|
|
|
|
|
|
|
= note: the method `write_fmt` exists but the following trait bounds were not satisfied:
|
|
|
|
`std::io::BufWriter<&dyn std::io::Write> : std::io::Write`
|
2019-12-15 09:12:30 -06:00
|
|
|
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info)
|
2019-10-03 19:10:37 -05:00
|
|
|
|
|
|
|
error: aborting due to 4 previous errors
|
|
|
|
|
|
|
|
Some errors have detailed explanations: E0277, E0599.
|
|
|
|
For more information about an error, try `rustc --explain E0277`.
|