diff options
| author | bors <bors@rust-lang.org> | 2022-05-17 01:46:25 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-05-17 01:46:25 +0000 |
| commit | c1d65eaa456d3986e38868e68e6ce25d802f06b4 (patch) | |
| tree | 01aa9fd87338a25a484b612c519982682f11ff15 /src/test | |
| parent | c1cfdd1fb225d64e78b8d8cbab83564ac2dd5ec2 (diff) | |
| parent | 0cefa5fa183fc2ff672d68a4c67009b79ded76e4 (diff) | |
| download | rust-c1d65eaa456d3986e38868e68e6ce25d802f06b4.tar.gz rust-c1d65eaa456d3986e38868e68e6ce25d802f06b4.zip | |
Auto merge of #96892 - oli-obk:🐌_obligation_cause_code_🐌, r=estebank
Clean up derived obligation creation r? `@estebank` working on fixing the perf regression from https://github.com/rust-lang/rust/pull/91030#issuecomment-1083360210
Diffstat (limited to 'src/test')
3 files changed, 24 insertions, 5 deletions
diff --git a/src/test/ui/associated-types/hr-associated-type-projection-1.stderr b/src/test/ui/associated-types/hr-associated-type-projection-1.stderr index 9c29e969de8..a65f84ae58e 100644 --- a/src/test/ui/associated-types/hr-associated-type-projection-1.stderr +++ b/src/test/ui/associated-types/hr-associated-type-projection-1.stderr @@ -2,10 +2,18 @@ error[E0271]: type mismatch resolving `<T as Deref>::Target == T` --> $DIR/hr-associated-type-projection-1.rs:13:33 | LL | impl<T: Copy + std::ops::Deref> UnsafeCopy<'_, T> for T { - | - this type parameter ^^^^^^^^^^^^^^^^^ expected associated type, found type parameter `T` + | - this type parameter ^^^^^^^^^^^^^^^^^ expected type parameter `T`, found associated type | - = note: expected associated type `<T as Deref>::Target` - found type parameter `T` + = note: expected type parameter `T` + found associated type `<T as Deref>::Target` +note: required by a bound in `UnsafeCopy` + --> $DIR/hr-associated-type-projection-1.rs:3:64 + | +LL | trait UnsafeCopy<'a, T: Copy> + | ---------- required by a bound in this +LL | where +LL | for<'b> <Self as UnsafeCopy<'b, T>>::Item: std::ops::Deref<Target = T>, + | ^^^^^^^^^^ required by this bound in `UnsafeCopy` help: consider further restricting this bound | LL | impl<T: Copy + std::ops::Deref + Deref<Target = T>> UnsafeCopy<'_, T> for T { diff --git a/src/test/ui/builtin-superkinds/builtin-superkinds-self-type.stderr b/src/test/ui/builtin-superkinds/builtin-superkinds-self-type.stderr index b1e59e9d5de..e2b177b951c 100644 --- a/src/test/ui/builtin-superkinds/builtin-superkinds-self-type.stderr +++ b/src/test/ui/builtin-superkinds/builtin-superkinds-self-type.stderr @@ -2,8 +2,13 @@ error[E0310]: the parameter type `T` may not live long enough --> $DIR/builtin-superkinds-self-type.rs:10:16 | LL | impl <T: Sync> Foo for T { } - | ^^^ ...so that the type `T` will meet its required lifetime bounds + | ^^^ ...so that the type `T` will meet its required lifetime bounds... | +note: ...that is required by this bound + --> $DIR/builtin-superkinds-self-type.rs:6:24 + | +LL | trait Foo : Sized+Sync+'static { + | ^^^^^^^ help: consider adding an explicit lifetime bound... | LL | impl <T: Sync + 'static> Foo for T { } diff --git a/src/test/ui/traits/assoc-type-in-superbad.stderr b/src/test/ui/traits/assoc-type-in-superbad.stderr index cbdb6b96f46..f3694791417 100644 --- a/src/test/ui/traits/assoc-type-in-superbad.stderr +++ b/src/test/ui/traits/assoc-type-in-superbad.stderr @@ -2,7 +2,13 @@ error[E0271]: type mismatch resolving `<std::vec::IntoIter<i32> as Iterator>::It --> $DIR/assoc-type-in-superbad.rs:12:16 | LL | type Key = u32; - | ^^^ expected `i32`, found `u32` + | ^^^ expected `u32`, found `i32` + | +note: required by a bound in `Foo` + --> $DIR/assoc-type-in-superbad.rs:7:25 + | +LL | pub trait Foo: Iterator<Item=<Self as Foo>::Key> { + | ^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Foo` error: aborting due to previous error |
