diff options
| author | Matthew Jasper <mjjasper1@gmail.com> | 2020-07-25 21:27:34 +0100 |
|---|---|---|
| committer | Matthew Jasper <mjjasper1@gmail.com> | 2020-10-06 11:19:32 +0100 |
| commit | e29765250b84809dc11fc26220dfcc544680d582 (patch) | |
| tree | 9e87b6fced34044b655fb20160942e6e54998440 /src/test | |
| parent | 6c4feb681f8062060ed0c21d311c27eba8791d42 (diff) | |
| download | rust-e29765250b84809dc11fc26220dfcc544680d582.tar.gz rust-e29765250b84809dc11fc26220dfcc544680d582.zip | |
Don't immediately error for recursive projections
Diffstat (limited to 'src/test')
6 files changed, 13 insertions, 12 deletions
diff --git a/src/test/ui/associated-type-bounds/bad-bounds-on-assoc-in-trait.rs b/src/test/ui/associated-type-bounds/bad-bounds-on-assoc-in-trait.rs index 8093c4b9d9e..4f9100b6774 100644 --- a/src/test/ui/associated-type-bounds/bad-bounds-on-assoc-in-trait.rs +++ b/src/test/ui/associated-type-bounds/bad-bounds-on-assoc-in-trait.rs @@ -24,7 +24,9 @@ impl<'a, 'b> Lam<&'a &'b u8> for L2 { trait Case1 { type C: Clone + Iterator<Item: Send + Iterator<Item: for<'a> Lam<&'a u8, App: Debug>> + Sync>; - //~^ ERROR overflow evaluating the requirement `<<Self as Case1>::C as std::iter::Iterator>::Item` + //~^ ERROR `<<Self as Case1>::C as std::iter::Iterator>::Item` is not an iterator + //~| ERROR `<<Self as Case1>::C as std::iter::Iterator>::Item` cannot be sent between threads safely + //~| ERROR `<<Self as Case1>::C as std::iter::Iterator>::Item` cannot be shared between threads safely } pub struct S1; diff --git a/src/test/ui/associated-type-bounds/bad-bounds-on-assoc-in-trait.stderr b/src/test/ui/associated-type-bounds/bad-bounds-on-assoc-in-trait.stderr index abaae7e5343..c95c5ca5884 100644 --- a/src/test/ui/associated-type-bounds/bad-bounds-on-assoc-in-trait.stderr +++ b/src/test/ui/associated-type-bounds/bad-bounds-on-assoc-in-trait.stderr @@ -1,4 +1,4 @@ -error[E0275]: overflow evaluating the requirement `<<Self as Case1>::C as std::iter::Iterator>::Item` +error[E0277]: `<<Self as Case1>::C as std::iter::Iterator>::Item` is not an iterator --> $DIR/bad-bounds-on-assoc-in-trait.rs:28:5 | LL | / type C: Clone + Iterator<Item: @@ -49,6 +49,6 @@ help: consider further restricting the associated type LL | trait Case1 where <<Self as Case1>::C as std::iter::Iterator>::Item: std::marker::Sync { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -error: aborting due to previous error +error: aborting due to 3 previous errors -For more information about this error, try `rustc --explain E0275`. +For more information about this error, try `rustc --explain E0277`. diff --git a/src/test/ui/associated-types/defaults-cyclic-fail-1.stderr b/src/test/ui/associated-types/defaults-cyclic-fail-1.stderr index 28decb0934c..ae7150d47ca 100644 --- a/src/test/ui/associated-types/defaults-cyclic-fail-1.stderr +++ b/src/test/ui/associated-types/defaults-cyclic-fail-1.stderr @@ -1,10 +1,10 @@ -error[E0275]: overflow evaluating the requirement `<bool as Tr>::B` +error[E0271]: type mismatch resolving `<bool as Tr>::B == _` --> $DIR/defaults-cyclic-fail-1.rs:26:5 | LL | type A = Box<Self::B>; | ^^^^^^^^^^^^^^^^^^^^^^ cyclic type of infinite size -error[E0275]: overflow evaluating the requirement `<usize as Tr>::A` +error[E0271]: type mismatch resolving `<usize as Tr>::A == _` --> $DIR/defaults-cyclic-fail-1.rs:32:5 | LL | type B = &'static Self::A; @@ -12,5 +12,4 @@ LL | type B = &'static Self::A; error: aborting due to 2 previous errors -Some errors have detailed explanations: E0271, E0275. -For more information about an error, try `rustc --explain E0271`. +For more information about this error, try `rustc --explain E0271`. diff --git a/src/test/ui/associated-types/defaults-cyclic-fail-2.stderr b/src/test/ui/associated-types/defaults-cyclic-fail-2.stderr index 6b6d5348c15..0dfbac2dec5 100644 --- a/src/test/ui/associated-types/defaults-cyclic-fail-2.stderr +++ b/src/test/ui/associated-types/defaults-cyclic-fail-2.stderr @@ -1,10 +1,10 @@ -error[E0275]: overflow evaluating the requirement `<bool as Tr>::B` +error[E0271]: type mismatch resolving `<bool as Tr>::B == _` --> $DIR/defaults-cyclic-fail-2.rs:27:5 | LL | type A = Box<Self::B>; | ^^^^^^^^^^^^^^^^^^^^^^ cyclic type of infinite size -error[E0275]: overflow evaluating the requirement `<usize as Tr>::A` +error[E0271]: type mismatch resolving `<usize as Tr>::A == _` --> $DIR/defaults-cyclic-fail-2.rs:33:5 | LL | type B = &'static Self::A; diff --git a/src/test/ui/issues/issue-21946.stderr b/src/test/ui/issues/issue-21946.stderr index 8b96e0f3382..0497bd20469 100644 --- a/src/test/ui/issues/issue-21946.stderr +++ b/src/test/ui/issues/issue-21946.stderr @@ -1,4 +1,4 @@ -error[E0275]: overflow evaluating the requirement `<FooStruct as Foo>::A` +error[E0275]: overflow evaluating the requirement `<FooStruct as Foo>::A == _` --> $DIR/issue-21946.rs:8:5 | LL | type A = <FooStruct as Foo>::A; diff --git a/src/test/ui/issues/issue-23122-1.stderr b/src/test/ui/issues/issue-23122-1.stderr index f8374905370..1f78b0d152d 100644 --- a/src/test/ui/issues/issue-23122-1.stderr +++ b/src/test/ui/issues/issue-23122-1.stderr @@ -1,4 +1,4 @@ -error[E0275]: overflow evaluating the requirement `<GetNext<T> as Next>::Next` +error[E0275]: overflow evaluating the requirement `<GetNext<T> as Next>::Next == _` --> $DIR/issue-23122-1.rs:8:5 | LL | type Next = <GetNext<T> as Next>::Next; |
