summaryrefslogtreecommitdiffstats
path: root/tests/ui/suggestions/mut-borrow-needed-by-trait.stderr
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--tests/ui/suggestions/mut-borrow-needed-by-trait.stderr (renamed from src/test/ui/suggestions/mut-borrow-needed-by-trait.stderr)16
1 files changed, 4 insertions, 12 deletions
diff --git a/src/test/ui/suggestions/mut-borrow-needed-by-trait.stderr b/tests/ui/suggestions/mut-borrow-needed-by-trait.stderr
index d121932c8..6910b77d9 100644
--- a/src/test/ui/suggestions/mut-borrow-needed-by-trait.stderr
+++ b/tests/ui/suggestions/mut-borrow-needed-by-trait.stderr
@@ -9,9 +9,6 @@ LL | let fp = BufWriter::new(fp);
= note: `std::io::Write` is implemented for `&mut dyn std::io::Write`, but not for `&dyn std::io::Write`
note: required by a bound in `BufWriter::<W>::new`
--> $SRC_DIR/std/src/io/buffered/bufwriter.rs:LL:COL
- |
-LL | impl<W: Write> BufWriter<W> {
- | ^^^^^ required by this bound in `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
@@ -22,20 +19,15 @@ LL | let fp = BufWriter::new(fp);
= note: `std::io::Write` is implemented for `&mut dyn std::io::Write`, but not for `&dyn std::io::Write`
note: required by a bound in `BufWriter`
--> $SRC_DIR/std/src/io/buffered/bufwriter.rs:LL:COL
- |
-LL | pub struct BufWriter<W: Write> {
- | ^^^^^ required by this bound in `BufWriter`
-error[E0599]: the method `write_fmt` exists for struct `BufWriter<&dyn std::io::Write>`, but its trait bounds were not satisfied
+error[E0599]: the method `write_fmt` exists for struct `BufWriter<&dyn Write>`, but its trait bounds were not satisfied
--> $DIR/mut-borrow-needed-by-trait.rs:21:5
|
LL | writeln!(fp, "hello world").unwrap();
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ method cannot be called on `BufWriter<&dyn std::io::Write>` due to unsatisfied trait bounds
- |
- ::: $SRC_DIR/std/src/io/buffered/bufwriter.rs:LL:COL
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ method cannot be called on `BufWriter<&dyn Write>` due to unsatisfied trait bounds
+ --> $SRC_DIR/std/src/io/buffered/bufwriter.rs:LL:COL
|
-LL | pub struct BufWriter<W: Write> {
- | ------------------------------ doesn't satisfy `BufWriter<&dyn std::io::Write>: std::io::Write`
+ = note: doesn't satisfy `BufWriter<&dyn std::io::Write>: std::io::Write`
|
= note: the following trait bounds were not satisfied:
`&dyn std::io::Write: std::io::Write`