diff options
Diffstat (limited to 'src/test/ui/traits/bound')
7 files changed, 14 insertions, 18 deletions
diff --git a/src/test/ui/traits/bound/assoc-fn-bound-root-obligation.rs b/src/test/ui/traits/bound/assoc-fn-bound-root-obligation.rs index 1d2345180..f9a934764 100644 --- a/src/test/ui/traits/bound/assoc-fn-bound-root-obligation.rs +++ b/src/test/ui/traits/bound/assoc-fn-bound-root-obligation.rs @@ -2,10 +2,9 @@ fn strip_lf(s: &str) -> &str { s.strip_suffix(b'\n').unwrap_or(s) //~^ ERROR expected a `FnMut<(char,)>` closure, found `u8` //~| NOTE expected an `FnMut<(char,)>` closure, found `u8` - //~| NOTE required by a bound introduced by this call //~| HELP the trait `FnMut<(char,)>` is not implemented for `u8` //~| HELP the following other types implement trait `Pattern<'a>`: - //~| NOTE required because of the requirements on the impl of `Pattern<'_>` for `u8` + //~| NOTE required for `u8` to implement `Pattern<'_>` } diff --git a/src/test/ui/traits/bound/assoc-fn-bound-root-obligation.stderr b/src/test/ui/traits/bound/assoc-fn-bound-root-obligation.stderr index 6ce57b626..ce9ab2d81 100644 --- a/src/test/ui/traits/bound/assoc-fn-bound-root-obligation.stderr +++ b/src/test/ui/traits/bound/assoc-fn-bound-root-obligation.stderr @@ -1,10 +1,8 @@ error[E0277]: expected a `FnMut<(char,)>` closure, found `u8` - --> $DIR/assoc-fn-bound-root-obligation.rs:2:20 + --> $DIR/assoc-fn-bound-root-obligation.rs:2:7 | LL | s.strip_suffix(b'\n').unwrap_or(s) - | ------------ ^^^^^ expected an `FnMut<(char,)>` closure, found `u8` - | | - | required by a bound introduced by this call + | ^^^^^^^^^^^^ expected an `FnMut<(char,)>` closure, found `u8` | = help: the trait `FnMut<(char,)>` is not implemented for `u8` = help: the following other types implement trait `Pattern<'a>`: @@ -15,7 +13,7 @@ LL | s.strip_suffix(b'\n').unwrap_or(s) &'c &'b str [char; N] char - = note: required because of the requirements on the impl of `Pattern<'_>` for `u8` + = note: required for `u8` to implement `Pattern<'_>` error: aborting due to previous error diff --git a/src/test/ui/traits/bound/not-on-bare-trait.stderr b/src/test/ui/traits/bound/not-on-bare-trait.stderr index 8a92dd118..1c52629da 100644 --- a/src/test/ui/traits/bound/not-on-bare-trait.stderr +++ b/src/test/ui/traits/bound/not-on-bare-trait.stderr @@ -9,9 +9,8 @@ LL | fn foo(_x: Foo + Send) { = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html> help: use `dyn` | -LL - fn foo(_x: Foo + Send) { -LL + fn foo(_x: dyn Foo + Send) { - | +LL | fn foo(_x: dyn Foo + Send) { + | +++ error[E0277]: the size for values of type `(dyn Foo + Send + 'static)` cannot be known at compilation time --> $DIR/not-on-bare-trait.rs:7:8 diff --git a/src/test/ui/traits/bound/on-structs-and-enums-locals.rs b/src/test/ui/traits/bound/on-structs-and-enums-locals.rs index 21c0ce80f..60ba343bb 100644 --- a/src/test/ui/traits/bound/on-structs-and-enums-locals.rs +++ b/src/test/ui/traits/bound/on-structs-and-enums-locals.rs @@ -8,8 +8,8 @@ struct Foo<T:Trait> { fn main() { let foo = Foo { - //~^ ERROR E0277 x: 3 + //~^ ERROR E0277 }; let baz: Foo<usize> = loop { }; diff --git a/src/test/ui/traits/bound/on-structs-and-enums-locals.stderr b/src/test/ui/traits/bound/on-structs-and-enums-locals.stderr index c9068a270..20bbe69c0 100644 --- a/src/test/ui/traits/bound/on-structs-and-enums-locals.stderr +++ b/src/test/ui/traits/bound/on-structs-and-enums-locals.stderr @@ -11,10 +11,10 @@ LL | struct Foo<T:Trait> { | ^^^^^ required by this bound in `Foo` error[E0277]: the trait bound `{integer}: Trait` is not satisfied - --> $DIR/on-structs-and-enums-locals.rs:10:15 + --> $DIR/on-structs-and-enums-locals.rs:11:12 | -LL | let foo = Foo { - | ^^^ the trait `Trait` is not implemented for `{integer}` +LL | x: 3 + | ^ the trait `Trait` is not implemented for `{integer}` | note: required by a bound in `Foo` --> $DIR/on-structs-and-enums-locals.rs:5:14 diff --git a/src/test/ui/traits/bound/on-structs-and-enums-xc1.rs b/src/test/ui/traits/bound/on-structs-and-enums-xc1.rs index 8156868e0..5ef35b513 100644 --- a/src/test/ui/traits/bound/on-structs-and-enums-xc1.rs +++ b/src/test/ui/traits/bound/on-structs-and-enums-xc1.rs @@ -6,8 +6,8 @@ use on_structs_and_enums_xc::{Bar, Foo, Trait}; fn main() { let foo = Foo { - //~^ ERROR E0277 x: 3 + //~^ ERROR E0277 }; let bar: Bar<f64> = return; //~^ ERROR E0277 diff --git a/src/test/ui/traits/bound/on-structs-and-enums-xc1.stderr b/src/test/ui/traits/bound/on-structs-and-enums-xc1.stderr index f4cc64af9..3fb5decb7 100644 --- a/src/test/ui/traits/bound/on-structs-and-enums-xc1.stderr +++ b/src/test/ui/traits/bound/on-structs-and-enums-xc1.stderr @@ -11,10 +11,10 @@ LL | pub enum Bar<T:Trait> { | ^^^^^ required by this bound in `Bar` error[E0277]: the trait bound `{integer}: Trait` is not satisfied - --> $DIR/on-structs-and-enums-xc1.rs:8:15 + --> $DIR/on-structs-and-enums-xc1.rs:9:12 | -LL | let foo = Foo { - | ^^^ the trait `Trait` is not implemented for `{integer}` +LL | x: 3 + | ^ the trait `Trait` is not implemented for `{integer}` | note: required by a bound in `Foo` --> $DIR/auxiliary/on_structs_and_enums_xc.rs:5:18 |