diff options
| -rw-r--r-- | src/test/ui/cycle-projection-based-on-where-clause.rs | 24 | ||||
| -rw-r--r-- | src/test/ui/cycle-projection-based-on-where-clause.stderr | 16 | ||||
| -rw-r--r-- | src/test/ui/cycle-trait/cycle-trait-supertrait-direct.stderr | 7 | ||||
| -rw-r--r-- | src/test/ui/cycle-trait/cycle-trait-supertrait-indirect.stderr | 10 | ||||
| -rw-r--r-- | src/test/ui/issues/issue-12511.stderr | 10 | ||||
| -rw-r--r-- | src/test/ui/issues/issue-20772.stderr | 2 | ||||
| -rw-r--r-- | src/test/ui/issues/issue-20825.stderr | 2 | ||||
| -rw-r--r-- | src/test/ui/issues/issue-22673.rs | 5 | ||||
| -rw-r--r-- | src/test/ui/issues/issue-22673.stderr | 16 |
9 files changed, 31 insertions, 61 deletions
diff --git a/src/test/ui/cycle-projection-based-on-where-clause.rs b/src/test/ui/cycle-projection-based-on-where-clause.rs deleted file mode 100644 index d3609acfdff..00000000000 --- a/src/test/ui/cycle-projection-based-on-where-clause.rs +++ /dev/null @@ -1,24 +0,0 @@ -// Example cycle where a bound on `T` uses a shorthand for `T`. This -// creates a cycle because we have to know the bounds on `T` to figure -// out what trait defines `Item`, but we can't know the bounds on `T` -// without knowing how to handle `T::Item`. -// -// Note that in the future cases like this could perhaps become legal, -// if we got more fine-grained about our cycle detection or changed -// how we handle `T::Item` resolution. - -use std::ops::Add; - -// Preamble. -trait Trait { type Item; } - -struct A<T> - where T : Trait, - T : Add<T::Item> - //~^ ERROR cycle detected -{ - data: T -} - -fn main() { -} diff --git a/src/test/ui/cycle-projection-based-on-where-clause.stderr b/src/test/ui/cycle-projection-based-on-where-clause.stderr deleted file mode 100644 index 2c337cc6bf9..00000000000 --- a/src/test/ui/cycle-projection-based-on-where-clause.stderr +++ /dev/null @@ -1,16 +0,0 @@ -error[E0391]: cycle detected when computing the bounds for type parameter `T` - --> $DIR/cycle-projection-based-on-where-clause.rs:17:19 - | -LL | T : Add<T::Item> - | ^^^^^^^ - | - = note: ...which again requires computing the bounds for type parameter `T`, completing the cycle -note: cycle used when computing explicit predicates of `A` - --> $DIR/cycle-projection-based-on-where-clause.rs:17:19 - | -LL | T : Add<T::Item> - | ^^^^^^^ - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0391`. diff --git a/src/test/ui/cycle-trait/cycle-trait-supertrait-direct.stderr b/src/test/ui/cycle-trait/cycle-trait-supertrait-direct.stderr index 8aa3ac8abf5..235f9088710 100644 --- a/src/test/ui/cycle-trait/cycle-trait-supertrait-direct.stderr +++ b/src/test/ui/cycle-trait/cycle-trait-supertrait-direct.stderr @@ -1,9 +1,14 @@ error[E0391]: cycle detected when computing the supertraits of `Chromosome` + --> $DIR/cycle-trait-supertrait-direct.rs:3:1 + | +LL | trait Chromosome: Chromosome { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | +note: ...which requires computing the supertraits of `Chromosome`... --> $DIR/cycle-trait-supertrait-direct.rs:3:19 | LL | trait Chromosome: Chromosome { | ^^^^^^^^^^ - | = note: ...which again requires computing the supertraits of `Chromosome`, completing the cycle note: cycle used when collecting item types in top-level module --> $DIR/cycle-trait-supertrait-direct.rs:3:1 diff --git a/src/test/ui/cycle-trait/cycle-trait-supertrait-indirect.stderr b/src/test/ui/cycle-trait/cycle-trait-supertrait-indirect.stderr index 9740f43a4ba..2df311f282a 100644 --- a/src/test/ui/cycle-trait/cycle-trait-supertrait-indirect.stderr +++ b/src/test/ui/cycle-trait/cycle-trait-supertrait-indirect.stderr @@ -1,9 +1,19 @@ error[E0391]: cycle detected when computing the supertraits of `B` + --> $DIR/cycle-trait-supertrait-indirect.rs:7:1 + | +LL | trait B: C { + | ^^^^^^^^^^ + | +note: ...which requires computing the supertraits of `B`... --> $DIR/cycle-trait-supertrait-indirect.rs:7:10 | LL | trait B: C { | ^ +note: ...which requires computing the supertraits of `C`... + --> $DIR/cycle-trait-supertrait-indirect.rs:11:1 | +LL | trait C: B { } + | ^^^^^^^^^^ note: ...which requires computing the supertraits of `C`... --> $DIR/cycle-trait-supertrait-indirect.rs:11:10 | diff --git a/src/test/ui/issues/issue-12511.stderr b/src/test/ui/issues/issue-12511.stderr index 37e38ff60ae..6450b7cad0c 100644 --- a/src/test/ui/issues/issue-12511.stderr +++ b/src/test/ui/issues/issue-12511.stderr @@ -1,9 +1,19 @@ error[E0391]: cycle detected when computing the supertraits of `T1` + --> $DIR/issue-12511.rs:1:1 + | +LL | trait T1 : T2 { + | ^^^^^^^^^^^^^ + | +note: ...which requires computing the supertraits of `T1`... --> $DIR/issue-12511.rs:1:12 | LL | trait T1 : T2 { | ^^ +note: ...which requires computing the supertraits of `T2`... + --> $DIR/issue-12511.rs:5:1 | +LL | trait T2 : T1 { + | ^^^^^^^^^^^^^ note: ...which requires computing the supertraits of `T2`... --> $DIR/issue-12511.rs:5:12 | diff --git a/src/test/ui/issues/issue-20772.stderr b/src/test/ui/issues/issue-20772.stderr index d64636310a3..6165337d024 100644 --- a/src/test/ui/issues/issue-20772.stderr +++ b/src/test/ui/issues/issue-20772.stderr @@ -7,7 +7,7 @@ LL | | {} | |__^ | = note: ...which again requires computing the supertraits of `T`, completing the cycle -note: cycle used when collecting item types in top-level module +note: cycle used when computing the supertraits of `T` --> $DIR/issue-20772.rs:1:1 | LL | / trait T : Iterator<Item=Self::Item> diff --git a/src/test/ui/issues/issue-20825.stderr b/src/test/ui/issues/issue-20825.stderr index 5f9709d1c64..a09a5290c37 100644 --- a/src/test/ui/issues/issue-20825.stderr +++ b/src/test/ui/issues/issue-20825.stderr @@ -5,7 +5,7 @@ LL | pub trait Processor: Subscriber<Input = Self::Input> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: ...which again requires computing the supertraits of `Processor`, completing the cycle -note: cycle used when collecting item types in top-level module +note: cycle used when computing the supertraits of `Processor` --> $DIR/issue-20825.rs:5:1 | LL | pub trait Processor: Subscriber<Input = Self::Input> { diff --git a/src/test/ui/issues/issue-22673.rs b/src/test/ui/issues/issue-22673.rs index ba8057b684d..4b9b4d6b23d 100644 --- a/src/test/ui/issues/issue-22673.rs +++ b/src/test/ui/issues/issue-22673.rs @@ -1,5 +1,6 @@ -trait Expr : PartialEq<Self::Item> { - //~^ ERROR: cycle detected +// check-pass + +trait Expr: PartialEq<Self::Item> { type Item; } diff --git a/src/test/ui/issues/issue-22673.stderr b/src/test/ui/issues/issue-22673.stderr deleted file mode 100644 index 9e7e4b218b1..00000000000 --- a/src/test/ui/issues/issue-22673.stderr +++ /dev/null @@ -1,16 +0,0 @@ -error[E0391]: cycle detected when computing the supertraits of `Expr` - --> $DIR/issue-22673.rs:1:1 - | -LL | trait Expr : PartialEq<Self::Item> { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | - = note: ...which again requires computing the supertraits of `Expr`, completing the cycle -note: cycle used when collecting item types in top-level module - --> $DIR/issue-22673.rs:1:1 - | -LL | trait Expr : PartialEq<Self::Item> { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0391`. |
