about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorEsteban Küber <esteban@kuber.com.ar>2020-02-17 23:22:19 -0800
committerEsteban Küber <esteban@kuber.com.ar>2020-02-28 11:37:58 -0800
commitf037d5ca1bf42108520a1fd3b07c5cec46bc94da (patch)
treefc41848ba2c8e5ff0ad08f77e41bc226cbfc1362 /src/test
parenteaa02f599f651246d5d1b99e7a4c6fa8d04bc9dc (diff)
downloadrust-f037d5ca1bf42108520a1fd3b07c5cec46bc94da.tar.gz
rust-f037d5ca1bf42108520a1fd3b07c5cec46bc94da.zip
Add more context to E0599 errors
Point at the intermediary unfullfilled trait bounds.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/ui/consts/too_generic_eval_ice.stderr4
-rw-r--r--src/test/ui/derives/derive-assoc-type-not-impl.stderr11
-rw-r--r--src/test/ui/issues/issue-21596.stderr3
-rw-r--r--src/test/ui/issues/issue-31173.rs4
-rw-r--r--src/test/ui/issues/issue-31173.stderr19
-rw-r--r--src/test/ui/issues/issue-35677.stderr4
-rw-r--r--src/test/ui/issues/issue-50264-inner-deref-trait/option-as_deref.stderr2
-rw-r--r--src/test/ui/issues/issue-50264-inner-deref-trait/option-as_deref_mut.stderr2
-rw-r--r--src/test/ui/issues/issue-50264-inner-deref-trait/result-as_deref.stderr2
-rw-r--r--src/test/ui/issues/issue-50264-inner-deref-trait/result-as_deref_err.stderr2
-rw-r--r--src/test/ui/issues/issue-50264-inner-deref-trait/result-as_deref_mut.stderr2
-rw-r--r--src/test/ui/issues/issue-50264-inner-deref-trait/result-as_deref_mut_err.stderr2
-rw-r--r--src/test/ui/methods/method-call-err-msg.stderr8
-rw-r--r--src/test/ui/mismatched_types/issue-36053-2.rs4
-rw-r--r--src/test/ui/mismatched_types/issue-36053-2.stderr18
-rw-r--r--src/test/ui/mismatched_types/method-help-unsatisfied-bound.stderr5
-rw-r--r--src/test/ui/specialization/defaultimpl/specialization-trait-not-implemented.stderr7
-rw-r--r--src/test/ui/suggestions/mut-borrow-needed-by-trait.rs4
-rw-r--r--src/test/ui/suggestions/mut-borrow-needed-by-trait.stderr16
-rw-r--r--src/test/ui/union/union-derive-clone.stderr11
-rw-r--r--src/test/ui/unique-object-noncopyable.rs4
-rw-r--r--src/test/ui/unique-object-noncopyable.stderr17
-rw-r--r--src/test/ui/unique-pinned-nocopy.rs4
-rw-r--r--src/test/ui/unique-pinned-nocopy.stderr13
24 files changed, 126 insertions, 42 deletions
diff --git a/src/test/ui/consts/too_generic_eval_ice.stderr b/src/test/ui/consts/too_generic_eval_ice.stderr
index fd68cb9c6cf..8836de0023c 100644
--- a/src/test/ui/consts/too_generic_eval_ice.stderr
+++ b/src/test/ui/consts/too_generic_eval_ice.stderr
@@ -8,8 +8,8 @@ LL |         [5; Self::HOST_SIZE] == [6; 0]
    |                   ^^^^^^^^^ associated item not found in `Foo<A, B>`
    |
    = note: the method `HOST_SIZE` exists but the following trait bounds were not satisfied:
-           `A : std::marker::Sized`
-           `B : std::marker::Sized`
+           `A: std::marker::Sized`
+           `B: std::marker::Sized`
 
 error[E0277]: the size for values of type `A` cannot be known at compilation time
   --> $DIR/too_generic_eval_ice.rs:7:13
diff --git a/src/test/ui/derives/derive-assoc-type-not-impl.stderr b/src/test/ui/derives/derive-assoc-type-not-impl.stderr
index 2083a1d6522..2746d8b7a14 100644
--- a/src/test/ui/derives/derive-assoc-type-not-impl.stderr
+++ b/src/test/ui/derives/derive-assoc-type-not-impl.stderr
@@ -2,13 +2,20 @@ error[E0599]: no method named `clone` found for struct `Bar<NotClone>` in the cu
   --> $DIR/derive-assoc-type-not-impl.rs:18:30
    |
 LL | struct Bar<T: Foo> {
-   | ------------------ method `clone` not found for this
+   | ------------------
+   | |
+   | method `clone` not found for this
+   | this type doesn't satisfy the bound `std::clone::Clone`
+...
+LL | struct NotClone;
+   | ---------------- this type doesn't satisfy the bound `std::clone::Clone`
 ...
 LL |     Bar::<NotClone> { x: 1 }.clone();
    |                              ^^^^^ method not found in `Bar<NotClone>`
    |
    = note: the method `clone` exists but the following trait bounds were not satisfied:
-           `Bar<NotClone> : std::clone::Clone`
+           `Bar<NotClone>: std::clone::Clone`
+           `NotClone: std::clone::Clone`
    = help: items from traits can only be used if the trait is implemented and in scope
    = note: the following trait defines an item `clone`, perhaps you need to implement it:
            candidate #1: `std::clone::Clone`
diff --git a/src/test/ui/issues/issue-21596.stderr b/src/test/ui/issues/issue-21596.stderr
index efde16167b7..d98302552ca 100644
--- a/src/test/ui/issues/issue-21596.stderr
+++ b/src/test/ui/issues/issue-21596.stderr
@@ -7,7 +7,8 @@ LL |     println!("{}", z.to_string());
    = note: try using `<*const T>::as_ref()` to get a reference to the type behind the pointer: https://doc.rust-lang.org/std/primitive.pointer.html#method.as_ref
    = note: using `<*const T>::as_ref()` on a pointer which is unaligned or points to invalid or uninitialized memory is undefined behavior
    = note: the method `to_string` exists but the following trait bounds were not satisfied:
-           `*const u8 : std::string::ToString`
+           `*const u8: std::fmt::Display`
+           `*const u8: std::string::ToString`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/issues/issue-31173.rs b/src/test/ui/issues/issue-31173.rs
index 26195318380..25be266c528 100644
--- a/src/test/ui/issues/issue-31173.rs
+++ b/src/test/ui/issues/issue-31173.rs
@@ -1,3 +1,7 @@
+// FIXME: missing sysroot spans (#53081)
+// ignore-i586-unknown-linux-gnu
+// ignore-i586-unknown-linux-musl
+// ignore-i686-unknown-linux-musl
 use std::vec::IntoIter;
 
 pub fn get_tok(it: &mut IntoIter<u8>) {
diff --git a/src/test/ui/issues/issue-31173.stderr b/src/test/ui/issues/issue-31173.stderr
index a614b96ac14..77cb7fb0426 100644
--- a/src/test/ui/issues/issue-31173.stderr
+++ b/src/test/ui/issues/issue-31173.stderr
@@ -1,5 +1,5 @@
-error[E0271]: type mismatch resolving `<std::iter::TakeWhile<&mut std::vec::IntoIter<u8>, [closure@$DIR/issue-31173.rs:6:39: 9:6 found_e:_]> as std::iter::Iterator>::Item == &_`
-  --> $DIR/issue-31173.rs:10:10
+error[E0271]: type mismatch resolving `<std::iter::TakeWhile<&mut std::vec::IntoIter<u8>, [closure@$DIR/issue-31173.rs:10:39: 13:6 found_e:_]> as std::iter::Iterator>::Item == &_`
+  --> $DIR/issue-31173.rs:14:10
    |
 LL |         .cloned()
    |          ^^^^^^ expected `u8`, found reference
@@ -7,15 +7,20 @@ LL |         .cloned()
    = note:   expected type `u8`
            found reference `&_`
 
-error[E0599]: no method named `collect` found for struct `std::iter::Cloned<std::iter::TakeWhile<&mut std::vec::IntoIter<u8>, [closure@$DIR/issue-31173.rs:6:39: 9:6 found_e:_]>>` in the current scope
-  --> $DIR/issue-31173.rs:14:10
+error[E0599]: no method named `collect` found for struct `std::iter::Cloned<std::iter::TakeWhile<&mut std::vec::IntoIter<u8>, [closure@$DIR/issue-31173.rs:10:39: 13:6 found_e:_]>>` in the current scope
+  --> $DIR/issue-31173.rs:18:10
    |
 LL |         .collect();
-   |          ^^^^^^^ method not found in `std::iter::Cloned<std::iter::TakeWhile<&mut std::vec::IntoIter<u8>, [closure@$DIR/issue-31173.rs:6:39: 9:6 found_e:_]>>`
+   |          ^^^^^^^ method not found in `std::iter::Cloned<std::iter::TakeWhile<&mut std::vec::IntoIter<u8>, [closure@$DIR/issue-31173.rs:10:39: 13:6 found_e:_]>>`
+   | 
+  ::: $SRC_DIR/libcore/iter/adapters/mod.rs:LL:COL
+   |
+LL | pub struct Cloned<I> {
+   | -------------------- this type doesn't satisfy the bound `std::iter::Iterator`
    |
    = note: the method `collect` exists but the following trait bounds were not satisfied:
-           `&mut std::iter::Cloned<std::iter::TakeWhile<&mut std::vec::IntoIter<u8>, [closure@$DIR/issue-31173.rs:6:39: 9:6 found_e:_]>> : std::iter::Iterator`
-           `std::iter::Cloned<std::iter::TakeWhile<&mut std::vec::IntoIter<u8>, [closure@$DIR/issue-31173.rs:6:39: 9:6 found_e:_]>> : std::iter::Iterator`
+           `&mut std::iter::Cloned<std::iter::TakeWhile<&mut std::vec::IntoIter<u8>, [closure@$DIR/issue-31173.rs:10:39: 13:6 found_e:_]>>: std::iter::Iterator`
+           `std::iter::Cloned<std::iter::TakeWhile<&mut std::vec::IntoIter<u8>, [closure@$DIR/issue-31173.rs:10:39: 13:6 found_e:_]>>: std::iter::Iterator`
 
 error: aborting due to 2 previous errors
 
diff --git a/src/test/ui/issues/issue-35677.stderr b/src/test/ui/issues/issue-35677.stderr
index a998f95d306..978221e502f 100644
--- a/src/test/ui/issues/issue-35677.stderr
+++ b/src/test/ui/issues/issue-35677.stderr
@@ -5,8 +5,8 @@ LL |     this.is_subset(other)
    |          ^^^^^^^^^ method not found in `&std::collections::HashSet<T>`
    |
    = note: the method `is_subset` exists but the following trait bounds were not satisfied:
-           `T : std::cmp::Eq`
-           `T : std::hash::Hash`
+           `T: std::cmp::Eq`
+           `T: std::hash::Hash`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/issues/issue-50264-inner-deref-trait/option-as_deref.stderr b/src/test/ui/issues/issue-50264-inner-deref-trait/option-as_deref.stderr
index f91f6e891ed..c6d9a8415dd 100644
--- a/src/test/ui/issues/issue-50264-inner-deref-trait/option-as_deref.stderr
+++ b/src/test/ui/issues/issue-50264-inner-deref-trait/option-as_deref.stderr
@@ -5,7 +5,7 @@ LL |     let _result = &Some(42).as_deref();
    |                             ^^^^^^^^ help: there is a method with a similar name: `as_ref`
    |
    = note: the method `as_deref` exists but the following trait bounds were not satisfied:
-           `{integer} : std::ops::Deref`
+           `{integer}: std::ops::Deref`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/issues/issue-50264-inner-deref-trait/option-as_deref_mut.stderr b/src/test/ui/issues/issue-50264-inner-deref-trait/option-as_deref_mut.stderr
index 583236345ca..ae51052a22c 100644
--- a/src/test/ui/issues/issue-50264-inner-deref-trait/option-as_deref_mut.stderr
+++ b/src/test/ui/issues/issue-50264-inner-deref-trait/option-as_deref_mut.stderr
@@ -5,7 +5,7 @@ LL |     let _result = &mut Some(42).as_deref_mut();
    |                                 ^^^^^^^^^^^^ method not found in `std::option::Option<{integer}>`
    |
    = note: the method `as_deref_mut` exists but the following trait bounds were not satisfied:
-           `{integer} : std::ops::DerefMut`
+           `{integer}: std::ops::DerefMut`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/issues/issue-50264-inner-deref-trait/result-as_deref.stderr b/src/test/ui/issues/issue-50264-inner-deref-trait/result-as_deref.stderr
index fae11fe62b1..3f7904a8521 100644
--- a/src/test/ui/issues/issue-50264-inner-deref-trait/result-as_deref.stderr
+++ b/src/test/ui/issues/issue-50264-inner-deref-trait/result-as_deref.stderr
@@ -5,7 +5,7 @@ LL |     let _result = &Ok(42).as_deref();
    |                           ^^^^^^^^ help: there is a method with a similar name: `as_ref`
    |
    = note: the method `as_deref` exists but the following trait bounds were not satisfied:
-           `{integer} : std::ops::Deref`
+           `{integer}: std::ops::Deref`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/issues/issue-50264-inner-deref-trait/result-as_deref_err.stderr b/src/test/ui/issues/issue-50264-inner-deref-trait/result-as_deref_err.stderr
index 1d98361c461..eb591b419ea 100644
--- a/src/test/ui/issues/issue-50264-inner-deref-trait/result-as_deref_err.stderr
+++ b/src/test/ui/issues/issue-50264-inner-deref-trait/result-as_deref_err.stderr
@@ -5,7 +5,7 @@ LL |     let _result = &Err(41).as_deref_err();
    |                            ^^^^^^^^^^^^ help: there is a method with a similar name: `as_deref_mut`
    |
    = note: the method `as_deref_err` exists but the following trait bounds were not satisfied:
-           `{integer} : std::ops::Deref`
+           `{integer}: std::ops::Deref`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/issues/issue-50264-inner-deref-trait/result-as_deref_mut.stderr b/src/test/ui/issues/issue-50264-inner-deref-trait/result-as_deref_mut.stderr
index 2c6231fb3b5..115518dcf67 100644
--- a/src/test/ui/issues/issue-50264-inner-deref-trait/result-as_deref_mut.stderr
+++ b/src/test/ui/issues/issue-50264-inner-deref-trait/result-as_deref_mut.stderr
@@ -5,7 +5,7 @@ LL |     let _result = &mut Ok(42).as_deref_mut();
    |                               ^^^^^^^^^^^^ help: there is a method with a similar name: `as_deref_err`
    |
    = note: the method `as_deref_mut` exists but the following trait bounds were not satisfied:
-           `{integer} : std::ops::DerefMut`
+           `{integer}: std::ops::DerefMut`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/issues/issue-50264-inner-deref-trait/result-as_deref_mut_err.stderr b/src/test/ui/issues/issue-50264-inner-deref-trait/result-as_deref_mut_err.stderr
index 950a050ea9f..49f4a16d8ae 100644
--- a/src/test/ui/issues/issue-50264-inner-deref-trait/result-as_deref_mut_err.stderr
+++ b/src/test/ui/issues/issue-50264-inner-deref-trait/result-as_deref_mut_err.stderr
@@ -5,7 +5,7 @@ LL |     let _result = &mut Err(41).as_deref_mut_err();
    |                                ^^^^^^^^^^^^^^^^ help: there is a method with a similar name: `as_deref_mut`
    |
    = note: the method `as_deref_mut_err` exists but the following trait bounds were not satisfied:
-           `{integer} : std::ops::DerefMut`
+           `{integer}: std::ops::DerefMut`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/methods/method-call-err-msg.stderr b/src/test/ui/methods/method-call-err-msg.stderr
index ab1ef5b9d5a..0c48e93347d 100644
--- a/src/test/ui/methods/method-call-err-msg.stderr
+++ b/src/test/ui/methods/method-call-err-msg.stderr
@@ -35,13 +35,17 @@ error[E0599]: no method named `take` found for struct `Foo` in the current scope
   --> $DIR/method-call-err-msg.rs:19:7
    |
 LL | pub struct Foo;
-   | --------------- method `take` not found for this
+   | ---------------
+   | |
+   | method `take` not found for this
+   | this type doesn't satisfy the bound `std::iter::Iterator`
 ...
 LL |      .take()
    |       ^^^^ method not found in `Foo`
    |
    = note: the method `take` exists but the following trait bounds were not satisfied:
-           `&mut Foo : std::iter::Iterator`
+           `&mut Foo: std::iter::Iterator`
+           `Foo: std::iter::Iterator`
    = help: items from traits can only be used if the trait is implemented and in scope
    = note: the following traits define an item `take`, perhaps you need to implement one of them:
            candidate #1: `std::io::Read`
diff --git a/src/test/ui/mismatched_types/issue-36053-2.rs b/src/test/ui/mismatched_types/issue-36053-2.rs
index 9035e3380b0..36211b4ce70 100644
--- a/src/test/ui/mismatched_types/issue-36053-2.rs
+++ b/src/test/ui/mismatched_types/issue-36053-2.rs
@@ -1,3 +1,7 @@
+// FIXME: missing sysroot spans (#53081)
+// ignore-i586-unknown-linux-gnu
+// ignore-i586-unknown-linux-musl
+// ignore-i686-unknown-linux-musl
 // Regression test for #36053. ICE was caused due to obligations
 // being added to a special, dedicated fulfillment cx during
 // a probe.
diff --git a/src/test/ui/mismatched_types/issue-36053-2.stderr b/src/test/ui/mismatched_types/issue-36053-2.stderr
index f8d677b99d6..2b8b2d82ec2 100644
--- a/src/test/ui/mismatched_types/issue-36053-2.stderr
+++ b/src/test/ui/mismatched_types/issue-36053-2.stderr
@@ -1,15 +1,21 @@
-error[E0599]: no method named `count` found for struct `std::iter::Filter<std::iter::Fuse<std::iter::Once<&str>>, [closure@$DIR/issue-36053-2.rs:7:39: 7:53]>` in the current scope
-  --> $DIR/issue-36053-2.rs:7:55
+error[E0599]: no method named `count` found for struct `std::iter::Filter<std::iter::Fuse<std::iter::Once<&str>>, [closure@$DIR/issue-36053-2.rs:11:39: 11:53]>` in the current scope
+  --> $DIR/issue-36053-2.rs:11:55
    |
 LL |     once::<&str>("str").fuse().filter(|a: &str| true).count();
-   |                                                       ^^^^^ method not found in `std::iter::Filter<std::iter::Fuse<std::iter::Once<&str>>, [closure@$DIR/issue-36053-2.rs:7:39: 7:53]>`
+   |                                                       ^^^^^ method not found in `std::iter::Filter<std::iter::Fuse<std::iter::Once<&str>>, [closure@$DIR/issue-36053-2.rs:11:39: 11:53]>`
+   | 
+  ::: $SRC_DIR/libcore/iter/adapters/mod.rs:LL:COL
+   |
+LL | pub struct Filter<I, P> {
+   | ----------------------- this type doesn't satisfy the bound `std::iter::Iterator`
    |
    = note: the method `count` exists but the following trait bounds were not satisfied:
-           `&mut std::iter::Filter<std::iter::Fuse<std::iter::Once<&str>>, [closure@$DIR/issue-36053-2.rs:7:39: 7:53]> : std::iter::Iterator`
-           `std::iter::Filter<std::iter::Fuse<std::iter::Once<&str>>, [closure@$DIR/issue-36053-2.rs:7:39: 7:53]> : std::iter::Iterator`
+           `&mut std::iter::Filter<std::iter::Fuse<std::iter::Once<&str>>, [closure@$DIR/issue-36053-2.rs:11:39: 11:53]>: std::iter::Iterator`
+           `[closure@$DIR/issue-36053-2.rs:11:39: 11:53]: std::ops::FnMut<(&_,)>`
+           `std::iter::Filter<std::iter::Fuse<std::iter::Once<&str>>, [closure@$DIR/issue-36053-2.rs:11:39: 11:53]>: std::iter::Iterator`
 
 error[E0631]: type mismatch in closure arguments
-  --> $DIR/issue-36053-2.rs:7:32
+  --> $DIR/issue-36053-2.rs:11:32
    |
 LL |     once::<&str>("str").fuse().filter(|a: &str| true).count();
    |                                ^^^^^^ -------------- found signature of `for<'r> fn(&'r str) -> _`
diff --git a/src/test/ui/mismatched_types/method-help-unsatisfied-bound.stderr b/src/test/ui/mismatched_types/method-help-unsatisfied-bound.stderr
index bbfb0005056..a7681f9af5b 100644
--- a/src/test/ui/mismatched_types/method-help-unsatisfied-bound.stderr
+++ b/src/test/ui/mismatched_types/method-help-unsatisfied-bound.stderr
@@ -1,11 +1,14 @@
 error[E0599]: no method named `unwrap` found for enum `std::result::Result<(), Foo>` in the current scope
   --> $DIR/method-help-unsatisfied-bound.rs:5:7
    |
+LL | struct Foo;
+   | ----------- this type doesn't satisfy the bound `std::fmt::Debug`
+...
 LL |     a.unwrap();
    |       ^^^^^^ method not found in `std::result::Result<(), Foo>`
    |
    = note: the method `unwrap` exists but the following trait bounds were not satisfied:
-           `Foo : std::fmt::Debug`
+           `Foo: std::fmt::Debug`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/specialization/defaultimpl/specialization-trait-not-implemented.stderr b/src/test/ui/specialization/defaultimpl/specialization-trait-not-implemented.stderr
index 19809778a5e..2d0caf1dd87 100644
--- a/src/test/ui/specialization/defaultimpl/specialization-trait-not-implemented.stderr
+++ b/src/test/ui/specialization/defaultimpl/specialization-trait-not-implemented.stderr
@@ -2,13 +2,16 @@ error[E0599]: no method named `foo_one` found for struct `MyStruct` in the curre
   --> $DIR/specialization-trait-not-implemented.rs:22:29
    |
 LL | struct MyStruct;
-   | ---------------- method `foo_one` not found for this
+   | ----------------
+   | |
+   | method `foo_one` not found for this
+   | this type doesn't satisfy the bound `Foo`
 ...
 LL |     println!("{}", MyStruct.foo_one());
    |                             ^^^^^^^ method not found in `MyStruct`
    |
    = note: the method `foo_one` exists but the following trait bounds were not satisfied:
-           `MyStruct : Foo`
+           `MyStruct: Foo`
    = help: items from traits can only be used if the trait is implemented and in scope
    = note: the following trait defines an item `foo_one`, perhaps you need to implement it:
            candidate #1: `Foo`
diff --git a/src/test/ui/suggestions/mut-borrow-needed-by-trait.rs b/src/test/ui/suggestions/mut-borrow-needed-by-trait.rs
index f8b86377187..49a37498fd9 100644
--- a/src/test/ui/suggestions/mut-borrow-needed-by-trait.rs
+++ b/src/test/ui/suggestions/mut-borrow-needed-by-trait.rs
@@ -1,3 +1,7 @@
+// FIXME: missing sysroot spans (#53081)
+// ignore-i586-unknown-linux-gnu
+// ignore-i586-unknown-linux-musl
+// ignore-i686-unknown-linux-musl
 use std::env::args;
 use std::fs::File;
 use std::io::{stdout, Write, BufWriter};
diff --git a/src/test/ui/suggestions/mut-borrow-needed-by-trait.stderr b/src/test/ui/suggestions/mut-borrow-needed-by-trait.stderr
index 8dc041ace36..5de7295f4f4 100644
--- a/src/test/ui/suggestions/mut-borrow-needed-by-trait.stderr
+++ b/src/test/ui/suggestions/mut-borrow-needed-by-trait.stderr
@@ -1,5 +1,5 @@
 error[E0277]: the trait bound `&dyn std::io::Write: std::io::Write` is not satisfied
-  --> $DIR/mut-borrow-needed-by-trait.rs:17:29
+  --> $DIR/mut-borrow-needed-by-trait.rs:21:29
    |
 LL |     let fp = BufWriter::new(fp);
    |                             ^^ the trait `std::io::Write` is not implemented for `&dyn std::io::Write`
@@ -8,7 +8,7 @@ LL |     let fp = BufWriter::new(fp);
    = 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
+  --> $DIR/mut-borrow-needed-by-trait.rs:21:14
    |
 LL |     let fp = BufWriter::new(fp);
    |              ^^^^^^^^^^^^^^ the trait `std::io::Write` is not implemented for `&dyn std::io::Write`
@@ -17,7 +17,7 @@ LL |     let fp = BufWriter::new(fp);
    = 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
+  --> $DIR/mut-borrow-needed-by-trait.rs:21:14
    |
 LL |     let fp = BufWriter::new(fp);
    |              ^^^^^^^^^^^^^^^^^^ the trait `std::io::Write` is not implemented for `&dyn std::io::Write`
@@ -26,13 +26,19 @@ LL |     let fp = BufWriter::new(fp);
    = note: required by `std::io::BufWriter`
 
 error[E0599]: no method named `write_fmt` found for struct `std::io::BufWriter<&dyn std::io::Write>` in the current scope
-  --> $DIR/mut-borrow-needed-by-trait.rs:22:5
+  --> $DIR/mut-borrow-needed-by-trait.rs:26:5
    |
 LL |     writeln!(fp, "hello world").unwrap();
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^ method not found in `std::io::BufWriter<&dyn std::io::Write>`
+   | 
+  ::: $SRC_DIR/libstd/io/buffered.rs:LL:COL
+   |
+LL | pub struct BufWriter<W: Write> {
+   | ------------------------------ this type doesn't satisfy the bound `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`
+           `&dyn std::io::Write: std::io::Write`
+           `std::io::BufWriter<&dyn std::io::Write>: std::io::Write`
    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: aborting due to 4 previous errors
diff --git a/src/test/ui/union/union-derive-clone.stderr b/src/test/ui/union/union-derive-clone.stderr
index 12b5321331a..289b680a46e 100644
--- a/src/test/ui/union/union-derive-clone.stderr
+++ b/src/test/ui/union/union-derive-clone.stderr
@@ -11,13 +11,20 @@ error[E0599]: no method named `clone` found for union `U5<CloneNoCopy>` in the c
   --> $DIR/union-derive-clone.rs:37:15
    |
 LL | union U5<T> {
-   | ----------- method `clone` not found for this
+   | -----------
+   | |
+   | method `clone` not found for this
+   | this type doesn't satisfy the bound `std::clone::Clone`
+...
+LL | struct CloneNoCopy;
+   | ------------------- this type doesn't satisfy the bound `std::marker::Copy`
 ...
 LL |     let w = u.clone();
    |               ^^^^^ method not found in `U5<CloneNoCopy>`
    |
    = note: the method `clone` exists but the following trait bounds were not satisfied:
-           `U5<CloneNoCopy> : std::clone::Clone`
+           `CloneNoCopy: std::marker::Copy`
+           `U5<CloneNoCopy>: std::clone::Clone`
    = help: items from traits can only be used if the trait is implemented and in scope
    = note: the following trait defines an item `clone`, perhaps you need to implement it:
            candidate #1: `std::clone::Clone`
diff --git a/src/test/ui/unique-object-noncopyable.rs b/src/test/ui/unique-object-noncopyable.rs
index dd38a7190aa..bedaf27c2dd 100644
--- a/src/test/ui/unique-object-noncopyable.rs
+++ b/src/test/ui/unique-object-noncopyable.rs
@@ -1,3 +1,7 @@
+// FIXME: missing sysroot spans (#53081)
+// ignore-i586-unknown-linux-gnu
+// ignore-i586-unknown-linux-musl
+// ignore-i686-unknown-linux-musl
 #![feature(box_syntax)]
 
 trait Foo {
diff --git a/src/test/ui/unique-object-noncopyable.stderr b/src/test/ui/unique-object-noncopyable.stderr
index 92cda6482c0..192558f6b09 100644
--- a/src/test/ui/unique-object-noncopyable.stderr
+++ b/src/test/ui/unique-object-noncopyable.stderr
@@ -1,11 +1,24 @@
 error[E0599]: no method named `clone` found for struct `std::boxed::Box<dyn Foo>` in the current scope
-  --> $DIR/unique-object-noncopyable.rs:24:16
+  --> $DIR/unique-object-noncopyable.rs:28:16
    |
+LL | trait Foo {
+   | ---------
+   | |
+   | this trait doesn't satisfy the bound `std::clone::Clone`
+   | this trait doesn't satisfy the bound `std::marker::Sized`
+...
 LL |     let _z = y.clone();
    |                ^^^^^ method not found in `std::boxed::Box<dyn Foo>`
+   | 
+  ::: $SRC_DIR/liballoc/boxed.rs:LL:COL
+   |
+LL | pub struct Box<T: ?Sized>(Unique<T>);
+   | ------------------------------------- this type doesn't satisfy the bound `std::clone::Clone`
    |
    = note: the method `clone` exists but the following trait bounds were not satisfied:
-           `std::boxed::Box<dyn Foo> : std::clone::Clone`
+           `dyn Foo: std::clone::Clone`
+           `dyn Foo: std::marker::Sized`
+           `std::boxed::Box<dyn Foo>: std::clone::Clone`
    = help: items from traits can only be used if the trait is implemented and in scope
    = note: the following trait defines an item `clone`, perhaps you need to implement it:
            candidate #1: `std::clone::Clone`
diff --git a/src/test/ui/unique-pinned-nocopy.rs b/src/test/ui/unique-pinned-nocopy.rs
index 4c30450c704..091b8a43862 100644
--- a/src/test/ui/unique-pinned-nocopy.rs
+++ b/src/test/ui/unique-pinned-nocopy.rs
@@ -1,3 +1,7 @@
+// FIXME: missing sysroot spans (#53081)
+// ignore-i586-unknown-linux-gnu
+// ignore-i586-unknown-linux-musl
+// ignore-i686-unknown-linux-musl
 #[derive(Debug)]
 struct R {
   b: bool,
diff --git a/src/test/ui/unique-pinned-nocopy.stderr b/src/test/ui/unique-pinned-nocopy.stderr
index e5c3eaccbd3..7c1bef07218 100644
--- a/src/test/ui/unique-pinned-nocopy.stderr
+++ b/src/test/ui/unique-pinned-nocopy.stderr
@@ -1,11 +1,20 @@
 error[E0599]: no method named `clone` found for struct `std::boxed::Box<R>` in the current scope
-  --> $DIR/unique-pinned-nocopy.rs:12:16
+  --> $DIR/unique-pinned-nocopy.rs:16:16
    |
+LL | struct R {
+   | -------- this type doesn't satisfy the bound `std::clone::Clone`
+...
 LL |     let _j = i.clone();
    |                ^^^^^ method not found in `std::boxed::Box<R>`
+   | 
+  ::: $SRC_DIR/liballoc/boxed.rs:LL:COL
+   |
+LL | pub struct Box<T: ?Sized>(Unique<T>);
+   | ------------------------------------- this type doesn't satisfy the bound `std::clone::Clone`
    |
    = note: the method `clone` exists but the following trait bounds were not satisfied:
-           `std::boxed::Box<R> : std::clone::Clone`
+           `R: std::clone::Clone`
+           `std::boxed::Box<R>: std::clone::Clone`
    = help: items from traits can only be used if the trait is implemented and in scope
    = note: the following trait defines an item `clone`, perhaps you need to implement it:
            candidate #1: `std::clone::Clone`