diff options
| author | Esteban Küber <esteban@kuber.com.ar> | 2021-04-07 08:31:38 -0700 |
|---|---|---|
| committer | Esteban Küber <esteban@kuber.com.ar> | 2021-04-07 08:31:38 -0700 |
| commit | 64e6288b8bd78dd8b0addbd0a599e393e2209b76 (patch) | |
| tree | 319e6f889d3ba1085b37824ae67ab8b02d65b5eb /src/test | |
| parent | 60c7f37f7ca755db24a414c66a919aab8ae7a9cc (diff) | |
| download | rust-64e6288b8bd78dd8b0addbd0a599e393e2209b76.tar.gz rust-64e6288b8bd78dd8b0addbd0a599e393e2209b76.zip | |
rebase and update tests
Diffstat (limited to 'src/test')
4 files changed, 42 insertions, 10 deletions
diff --git a/src/test/ui/generic-associated-types/impl_bounds.stderr b/src/test/ui/generic-associated-types/impl_bounds.stderr index afa43b5693e..58bcb13e68e 100644 --- a/src/test/ui/generic-associated-types/impl_bounds.stderr +++ b/src/test/ui/generic-associated-types/impl_bounds.stderr @@ -58,8 +58,8 @@ LL | type C where Self: Clone; | ^^^^^^^^^^^^^^^^^^^^^^^^^ this trait associated type doesn't have the requirement `Fooy<T>: Copy` help: consider restricting type parameter `T` | -LL | impl<T: Copy> Foo for Fooy<T> { - | ^^^^^^ +LL | impl<T: std::marker::Copy> Foo for Fooy<T> { + | ^^^^^^^^^^^^^^^^^^^ error[E0277]: the trait bound `T: Copy` is not satisfied --> $DIR/impl_bounds.rs:23:5 diff --git a/src/test/ui/impl-trait/projection-mismatch-in-impl-where-clause.stderr b/src/test/ui/impl-trait/projection-mismatch-in-impl-where-clause.stderr index d1956a9afb8..54eb5a96c9d 100644 --- a/src/test/ui/impl-trait/projection-mismatch-in-impl-where-clause.stderr +++ b/src/test/ui/impl-trait/projection-mismatch-in-impl-where-clause.stderr @@ -4,7 +4,11 @@ error[E0271]: type mismatch resolving `<() as Super>::Assoc == ()` LL | fn test() -> impl Test { | ^^^^^^^^^ expected `()`, found `u8` | - = note: required because of the requirements on the impl of `Test` for `()` +note: required because of the requirements on the impl of `Test` for `()` + --> $DIR/projection-mismatch-in-impl-where-clause.rs:11:9 + | +LL | impl<T> Test for T where T: Super<Assoc = ()> {} + | ^^^^ ^ error: aborting due to previous error diff --git a/src/test/ui/kindck/kindck-impl-type-params.nll.stderr b/src/test/ui/kindck/kindck-impl-type-params.nll.stderr index e9002ec36f4..035501009bd 100644 --- a/src/test/ui/kindck/kindck-impl-type-params.nll.stderr +++ b/src/test/ui/kindck/kindck-impl-type-params.nll.stderr @@ -4,7 +4,11 @@ error[E0277]: `T` cannot be sent between threads safely LL | let a = &t as &dyn Gettable<T>; | ^^ `T` cannot be sent between threads safely | - = note: required because of the requirements on the impl of `Gettable<T>` for `S<T>` +note: required because of the requirements on the impl of `Gettable<T>` for `S<T>` + --> $DIR/kindck-impl-type-params.rs:14:32 + | +LL | impl<T: Send + Copy + 'static> Gettable<T> for S<T> {} + | ^^^^^^^^^^^ ^^^^ = note: required for the cast to the object type `dyn Gettable<T>` help: consider restricting type parameter `T` | @@ -17,7 +21,11 @@ error[E0277]: the trait bound `T: Copy` is not satisfied LL | let a = &t as &dyn Gettable<T>; | ^^ the trait `Copy` is not implemented for `T` | - = note: required because of the requirements on the impl of `Gettable<T>` for `S<T>` +note: required because of the requirements on the impl of `Gettable<T>` for `S<T>` + --> $DIR/kindck-impl-type-params.rs:14:32 + | +LL | impl<T: Send + Copy + 'static> Gettable<T> for S<T> {} + | ^^^^^^^^^^^ ^^^^ = note: required for the cast to the object type `dyn Gettable<T>` help: consider restricting type parameter `T` | @@ -30,7 +38,11 @@ error[E0277]: `T` cannot be sent between threads safely LL | let a: &dyn Gettable<T> = &t; | ^^ `T` cannot be sent between threads safely | - = note: required because of the requirements on the impl of `Gettable<T>` for `S<T>` +note: required because of the requirements on the impl of `Gettable<T>` for `S<T>` + --> $DIR/kindck-impl-type-params.rs:14:32 + | +LL | impl<T: Send + Copy + 'static> Gettable<T> for S<T> {} + | ^^^^^^^^^^^ ^^^^ = note: required for the cast to the object type `dyn Gettable<T>` help: consider restricting type parameter `T` | @@ -43,7 +55,11 @@ error[E0277]: the trait bound `T: Copy` is not satisfied LL | let a: &dyn Gettable<T> = &t; | ^^ the trait `Copy` is not implemented for `T` | - = note: required because of the requirements on the impl of `Gettable<T>` for `S<T>` +note: required because of the requirements on the impl of `Gettable<T>` for `S<T>` + --> $DIR/kindck-impl-type-params.rs:14:32 + | +LL | impl<T: Send + Copy + 'static> Gettable<T> for S<T> {} + | ^^^^^^^^^^^ ^^^^ = note: required for the cast to the object type `dyn Gettable<T>` help: consider restricting type parameter `T` | @@ -56,7 +72,11 @@ error[E0277]: the trait bound `String: Copy` is not satisfied LL | let a = t as Box<dyn Gettable<String>>; | ^ the trait `Copy` is not implemented for `String` | - = note: required because of the requirements on the impl of `Gettable<String>` for `S<String>` +note: required because of the requirements on the impl of `Gettable<String>` for `S<String>` + --> $DIR/kindck-impl-type-params.rs:14:32 + | +LL | impl<T: Send + Copy + 'static> Gettable<T> for S<T> {} + | ^^^^^^^^^^^ ^^^^ = note: required for the cast to the object type `dyn Gettable<String>` error[E0277]: the trait bound `Foo: Copy` is not satisfied @@ -65,7 +85,11 @@ error[E0277]: the trait bound `Foo: Copy` is not satisfied LL | let a: Box<dyn Gettable<Foo>> = t; | ^ the trait `Copy` is not implemented for `Foo` | - = note: required because of the requirements on the impl of `Gettable<Foo>` for `S<Foo>` +note: required because of the requirements on the impl of `Gettable<Foo>` for `S<Foo>` + --> $DIR/kindck-impl-type-params.rs:14:32 + | +LL | impl<T: Send + Copy + 'static> Gettable<T> for S<T> {} + | ^^^^^^^^^^^ ^^^^ = note: required for the cast to the object type `dyn Gettable<Foo>` error: aborting due to 6 previous errors diff --git a/src/test/ui/rfc1623.nll.stderr b/src/test/ui/rfc1623.nll.stderr index b5dd0c9d2a6..a3d94679434 100644 --- a/src/test/ui/rfc1623.nll.stderr +++ b/src/test/ui/rfc1623.nll.stderr @@ -11,7 +11,11 @@ LL | | }; | = help: within `&SomeStruct`, the trait `Sync` is not implemented for `dyn for<'a, 'b> Fn(&'a Foo<'b>) -> &'a Foo<'b>` = note: required because it appears within the type `&dyn for<'a, 'b> Fn(&'a Foo<'b>) -> &'a Foo<'b>` - = note: required because it appears within the type `SomeStruct` +note: required because it appears within the type `SomeStruct` + --> $DIR/rfc1623.rs:11:8 + | +LL | struct SomeStruct<'x, 'y, 'z: 'x> { + | ^^^^^^^^^^ = note: required because it appears within the type `&SomeStruct` = note: shared static variables must have a type that implements `Sync` |
