diff options
| author | bors <bors@rust-lang.org> | 2020-11-29 21:04:23 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-11-29 21:04:23 +0000 |
| commit | 349b3b324dade7ca638091db93ba08bbc443c63d (patch) | |
| tree | 8c862e923cedac14f624219d5d4e9be8d6009af5 /src/test/ui/issues | |
| parent | b776d1c3e3db8befabb123ebb1e46c3531eaed46 (diff) | |
| parent | ada7c1f4292400ca536ec1d65438e5e024ffac18 (diff) | |
Auto merge of #79209 - spastorino:trait-inheritance-self, r=nikomatsakis
Allow Trait inheritance with cycles on associated types Fixes #35237 r? `@nikomatsakis` cc `@estebank`
Diffstat (limited to 'src/test/ui/issues')
| -rw-r--r-- | src/test/ui/issues/issue-12511.stderr | 16 | ||||
| -rw-r--r-- | src/test/ui/issues/issue-20772.stderr | 6 | ||||
| -rw-r--r-- | src/test/ui/issues/issue-20825.stderr | 6 | ||||
| -rw-r--r-- | src/test/ui/issues/issue-22673.rs | 5 | ||||
| -rw-r--r-- | src/test/ui/issues/issue-22673.stderr | 16 |
5 files changed, 22 insertions, 27 deletions
diff --git a/src/test/ui/issues/issue-12511.stderr b/src/test/ui/issues/issue-12511.stderr index 37e38ff60ae..5f2b98c5237 100644 --- a/src/test/ui/issues/issue-12511.stderr +++ b/src/test/ui/issues/issue-12511.stderr @@ -1,15 +1,25 @@ -error[E0391]: cycle detected when computing the supertraits of `T1` +error[E0391]: cycle detected when computing the super predicates of `T1` + --> $DIR/issue-12511.rs:1:1 + | +LL | trait T1 : T2 { + | ^^^^^^^^^^^^^ + | +note: ...which requires computing the super traits of `T1`... --> $DIR/issue-12511.rs:1:12 | LL | trait T1 : T2 { | ^^ +note: ...which requires computing the super predicates of `T2`... + --> $DIR/issue-12511.rs:5:1 | -note: ...which requires computing the supertraits of `T2`... +LL | trait T2 : T1 { + | ^^^^^^^^^^^^^ +note: ...which requires computing the super traits of `T2`... --> $DIR/issue-12511.rs:5:12 | LL | trait T2 : T1 { | ^^ - = note: ...which again requires computing the supertraits of `T1`, completing the cycle + = note: ...which again requires computing the super predicates of `T1`, completing the cycle note: cycle used when collecting item types in top-level module --> $DIR/issue-12511.rs:1:1 | diff --git a/src/test/ui/issues/issue-20772.stderr b/src/test/ui/issues/issue-20772.stderr index d64636310a3..4aecc7eab46 100644 --- a/src/test/ui/issues/issue-20772.stderr +++ b/src/test/ui/issues/issue-20772.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when computing the supertraits of `T` +error[E0391]: cycle detected when computing the super traits of `T` with associated type name `Item` --> $DIR/issue-20772.rs:1:1 | LL | / trait T : Iterator<Item=Self::Item> @@ -6,8 +6,8 @@ LL | | 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: ...which again requires computing the super traits of `T` with associated type name `Item`, completing the cycle +note: cycle used when computing the super traits 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..ccbe06d9c0d 100644 --- a/src/test/ui/issues/issue-20825.stderr +++ b/src/test/ui/issues/issue-20825.stderr @@ -1,11 +1,11 @@ -error[E0391]: cycle detected when computing the supertraits of `Processor` +error[E0391]: cycle detected when computing the super traits of `Processor` with associated type name `Input` --> $DIR/issue-20825.rs:5:1 | 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: ...which again requires computing the super traits of `Processor` with associated type name `Input`, completing the cycle +note: cycle used when computing the super traits 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`. |
