Skip to content

Commit 9cbe3b7

Browse files
committed
Update tests
1 parent 5841c68 commit 9cbe3b7

27 files changed

+83
-133
lines changed

src/test/compile-fail/coherence-inherited-assoc-ty-cycle-err.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#![feature(specialization)]
1818

1919
trait Trait<T> { type Assoc; }
20-
//~^ cyclic dependency detected [E0391]
20+
//~^ cycle detected
2121

2222
impl<T> Trait<T> for Vec<T> {
2323
type Assoc = ();

src/test/compile-fail/const-size_of-cycle.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
// error-pattern: cyclic dependency detected
11+
// error-pattern: cycle detected
1212

1313
#![feature(const_fn)]
1414

src/test/compile-fail/cycle-projection-based-on-where-clause.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ trait Trait { type Item; }
2525
struct A<T>
2626
where T : Trait,
2727
T : Add<T::Item>
28-
//~^ ERROR cyclic dependency detected
28+
//~^ ERROR cycle detected
2929
//~| ERROR associated type `Item` not found for `T`
3030
{
3131
data: T

src/test/compile-fail/cycle-trait-default-type-trait.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// again references the trait.
1313

1414
trait Foo<X = Box<Foo>> {
15-
//~^ ERROR cyclic dependency detected
15+
//~^ ERROR cycle detected
1616
}
1717

1818
fn main() { }

src/test/compile-fail/cycle-trait-supertrait-direct.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// Test a supertrait cycle where a trait extends itself.
1212

1313
trait Chromosome: Chromosome {
14-
//~^ ERROR cyclic dependency detected
14+
//~^ ERROR cycle detected
1515
}
1616

1717
fn main() { }

src/test/compile-fail/infinite-vec-type-recursion.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@
99
// except according to those terms.
1010

1111
type x = Vec<x>;
12-
//~^ ERROR cyclic dependency detected
12+
//~^ ERROR cycle detected
1313

1414
fn main() { let b: x = Vec::new(); }

src/test/compile-fail/issue-20772.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// except according to those terms.
1010

1111
trait T : Iterator<Item=Self::Item>
12-
//~^ ERROR cyclic dependency detected
12+
//~^ ERROR cycle detected
1313
//~| ERROR associated type `Item` not found for `Self`
1414
{}
1515

src/test/compile-fail/issue-20825.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ pub trait Subscriber {
1313
}
1414

1515
pub trait Processor: Subscriber<Input = Self::Input> {
16-
//~^ ERROR cyclic dependency detected [E0391]
16+
//~^ ERROR cycle detected
1717
type Input;
1818
}
1919

src/test/compile-fail/issue-21177.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ trait Trait {
1414
}
1515

1616
fn foo<T: Trait<A = T::B>>() { }
17-
//~^ ERROR cyclic dependency detected
17+
//~^ ERROR cycle detected
1818
//~| ERROR associated type `B` not found for `T`
1919

2020
fn main() { }

src/test/compile-fail/issue-22673.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// except according to those terms.
1010

1111
trait Expr : PartialEq<Self::Item> {
12-
//~^ ERROR: cyclic dependency detected
12+
//~^ ERROR: cycle detected
1313
type Item;
1414
}
1515

src/test/compile-fail/issue-26548.rs

+3-5
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,9 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
// error-pattern: cyclic dependency detected
12-
// note-pattern: the cycle begins when computing layout of
13-
// note-pattern: ...which then requires computing layout of
14-
// note-pattern: ...which then again requires computing layout of
15-
11+
// error-pattern: cycle detected when computing layout of
12+
// note-pattern: ...which requires computing layout of
13+
// note-pattern: ...which again requires computing layout of
1614

1715
trait Mirror { type It: ?Sized; }
1816
impl<T: ?Sized> Mirror for T { type It = Self; }

src/test/compile-fail/issue-34373.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ trait Trait<T> {
1414
fn foo(_: T) {}
1515
}
1616

17-
pub struct Foo<T = Box<Trait<DefaultFoo>>>;
18-
type DefaultFoo = Foo; //~ ERROR cyclic dependency detected
17+
pub struct Foo<T = Box<Trait<DefaultFoo>>>; //~ ERROR cycle detected
18+
type DefaultFoo = Foo;
1919

2020
fn main() {
2121
}

src/test/compile-fail/issue-44415.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,15 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// error-pattern: cycle detected when computing layout of
12+
1113
#![feature(const_fn)]
1214
#![feature(core_intrinsics)]
1315

1416
use std::intrinsics;
1517

1618
struct Foo {
1719
bytes: [u8; unsafe { intrinsics::size_of::<Foo>() }],
18-
//~^ ERROR cyclic dependency detected
1920
x: usize,
2021
}
2122

src/test/compile-fail/resolve-self-in-impl.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ impl Tr for S where Self: Copy {} // OK
2121
impl Tr for S where S<Self>: Copy {} // OK
2222
impl Tr for S where Self::A: Copy {} // OK
2323

24-
impl Tr for Self {} //~ ERROR cyclic dependency detected
25-
impl Tr for S<Self> {} //~ ERROR cyclic dependency detected
26-
impl Self {} //~ ERROR cyclic dependency detected
27-
impl S<Self> {} //~ ERROR cyclic dependency detected
28-
impl Tr<Self::A> for S {} //~ ERROR cyclic dependency detected
24+
impl Tr for Self {} //~ ERROR cycle detected
25+
impl Tr for S<Self> {} //~ ERROR cycle detected
26+
impl Self {} //~ ERROR cycle detected
27+
impl S<Self> {} //~ ERROR cycle detected
28+
impl Tr<Self::A> for S {} //~ ERROR cycle detected
2929

3030
fn main() {}

src/test/ui/cycle-trait-supertrait-indirect.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,9 @@ trait A: B {
1515
}
1616

1717
trait B: C {
18+
//~^ ERROR cycle detected
1819
}
1920

2021
trait C: B { }
21-
//~^ ERROR cyclic dependency detected
22-
//~| cyclic reference
2322

2423
fn main() { }

src/test/ui/cycle-trait-supertrait-indirect.stderr

+11-11
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
1-
error[E0391]: cyclic dependency detected
2-
--> $DIR/cycle-trait-supertrait-indirect.rs:20:1
1+
error[E0391]: cycle detected when computing the supertraits of `B`
2+
--> $DIR/cycle-trait-supertrait-indirect.rs:17:1
33
|
4-
LL | trait C: B { }
5-
| ^^^^^^^^^^ cyclic reference
4+
LL | trait B: C {
5+
| ^^^^^^^^^^
66
|
7-
note: the cycle begins when computing the supertraits of `B`...
8-
--> $DIR/cycle-trait-supertrait-indirect.rs:14:1
7+
note: ...which requires computing the supertraits of `C`...
8+
--> $DIR/cycle-trait-supertrait-indirect.rs:21:1
99
|
10-
LL | trait A: B {
10+
LL | trait C: B { }
1111
| ^^^^^^^^^^
12-
note: ...which then requires computing the supertraits of `C`...
13-
--> $DIR/cycle-trait-supertrait-indirect.rs:17:1
12+
= note: ...which again requires computing the supertraits of `B`, completing the cycle
13+
note: cycle used when computing the supertraits of `A`
14+
--> $DIR/cycle-trait-supertrait-indirect.rs:14:1
1415
|
15-
LL | trait B: C {
16+
LL | trait A: B {
1617
| ^^^^^^^^^^
17-
= note: ...which then again requires computing the supertraits of `B`, completing the cycle.
1818

1919
error: aborting due to previous error
2020

src/test/ui/impl-trait/auto-trait-leak.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,7 @@ fn after() -> impl Fn(i32) {
4040
// independently resolved and only require the concrete
4141
// return type, which can't depend on the obligation.
4242
fn cycle1() -> impl Clone {
43-
//~^ ERROR cyclic dependency detected
44-
//~| cyclic reference
43+
//~^ ERROR cycle detected
4544
send(cycle2().clone());
4645

4746
Rc::new(Cell::new(5))

src/test/ui/impl-trait/auto-trait-leak.stderr

+9-13
Original file line numberDiff line numberDiff line change
@@ -28,33 +28,29 @@ note: required by `send`
2828
LL | fn send<T: Send>(_: T) {}
2929
| ^^^^^^^^^^^^^^^^^^^^^^
3030

31-
error[E0391]: cyclic dependency detected
32-
--> $DIR/auto-trait-leak.rs:42:1
33-
|
34-
LL | fn cycle1() -> impl Clone {
35-
| ^^^^^^^^^^^^^^^^^^^^^^^^^ cyclic reference
36-
|
37-
note: the cycle begins when processing `cycle1`...
31+
error[E0391]: cycle detected when processing `cycle1`
3832
--> $DIR/auto-trait-leak.rs:42:1
3933
|
4034
LL | fn cycle1() -> impl Clone {
4135
| ^^^^^^^^^^^^^^^^^^^^^^^^^
42-
note: ...which then requires processing `cycle2::{{impl-Trait}}`...
43-
--> $DIR/auto-trait-leak.rs:50:16
36+
|
37+
note: ...which requires processing `cycle2::{{impl-Trait}}`...
38+
--> $DIR/auto-trait-leak.rs:49:16
4439
|
4540
LL | fn cycle2() -> impl Clone {
4641
| ^^^^^^^^^^
47-
note: ...which then requires processing `cycle2`...
48-
--> $DIR/auto-trait-leak.rs:50:1
42+
note: ...which requires processing `cycle2`...
43+
--> $DIR/auto-trait-leak.rs:49:1
4944
|
5045
LL | fn cycle2() -> impl Clone {
5146
| ^^^^^^^^^^^^^^^^^^^^^^^^^
52-
note: ...which then requires processing `cycle1::{{impl-Trait}}`...
47+
note: ...which requires processing `cycle1::{{impl-Trait}}`...
5348
--> $DIR/auto-trait-leak.rs:42:16
5449
|
5550
LL | fn cycle1() -> impl Clone {
5651
| ^^^^^^^^^^
57-
= note: ...which then again requires processing `cycle1`, completing the cycle.
52+
= note: ...which again requires processing `cycle1`, completing the cycle
53+
note: cycle used when type-checking all item bodies
5854

5955
error: aborting due to 3 previous errors
6056

src/test/ui/issue-12511.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,10 @@
99
// except according to those terms.
1010

1111
trait t1 : t2 {
12+
//~^ ERROR cycle detected
1213
}
1314

1415
trait t2 : t1 {
15-
//~^ ERROR cyclic dependency detected
16-
//~| cyclic reference
1716
}
1817

1918
fn main() { }

src/test/ui/issue-12511.stderr

+6-11
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,15 @@
1-
error[E0391]: cyclic dependency detected
2-
--> $DIR/issue-12511.rs:14:1
3-
|
4-
LL | trait t2 : t1 {
5-
| ^^^^^^^^^^^^^ cyclic reference
6-
|
7-
note: the cycle begins when computing the supertraits of `t1`...
1+
error[E0391]: cycle detected when computing the supertraits of `t1`
82
--> $DIR/issue-12511.rs:11:1
93
|
104
LL | trait t1 : t2 {
115
| ^^^^^^^^^^^^^
12-
note: ...which then requires computing the supertraits of `t2`...
13-
--> $DIR/issue-12511.rs:11:1
146
|
15-
LL | trait t1 : t2 {
7+
note: ...which requires computing the supertraits of `t2`...
8+
--> $DIR/issue-12511.rs:15:1
9+
|
10+
LL | trait t2 : t1 {
1611
| ^^^^^^^^^^^^^
17-
= note: ...which then again requires computing the supertraits of `t1`, completing the cycle.
12+
= note: ...which again requires computing the supertraits of `t1`, completing the cycle
1813

1914
error: aborting due to previous error
2015

src/test/ui/issue-23302-1.stderr

+4-13
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,11 @@
1-
error[E0391]: cyclic dependency detected
2-
--> $DIR/issue-23302-1.rs:14:9
3-
|
4-
LL | A = X::A as isize, //~ ERROR E0391
5-
| ^^^^^^^^^^^^^ cyclic reference
6-
|
7-
note: the cycle begins when const-evaluating `X::A::{{initializer}}`...
8-
--> $DIR/issue-23302-1.rs:14:9
9-
|
10-
LL | A = X::A as isize, //~ ERROR E0391
11-
| ^^^^^^^^^^^^^
12-
note: ...which then requires computing layout of `X`...
1+
error[E0391]: cycle detected when const-evaluating `X::A::{{initializer}}`
132
--> $DIR/issue-23302-1.rs:14:9
143
|
154
LL | A = X::A as isize, //~ ERROR E0391
165
| ^^^^
17-
= note: ...which then again requires const-evaluating `X::A::{{initializer}}`, completing the cycle.
6+
|
7+
note: ...which requires computing layout of `X`...
8+
= note: ...which again requires const-evaluating `X::A::{{initializer}}`, completing the cycle
189

1910
error: aborting due to previous error
2011

src/test/ui/issue-23302-2.stderr

+4-13
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,11 @@
1-
error[E0391]: cyclic dependency detected
2-
--> $DIR/issue-23302-2.rs:14:9
3-
|
4-
LL | A = Y::B as isize, //~ ERROR E0391
5-
| ^^^^^^^^^^^^^ cyclic reference
6-
|
7-
note: the cycle begins when const-evaluating `Y::A::{{initializer}}`...
8-
--> $DIR/issue-23302-2.rs:14:9
9-
|
10-
LL | A = Y::B as isize, //~ ERROR E0391
11-
| ^^^^^^^^^^^^^
12-
note: ...which then requires computing layout of `Y`...
1+
error[E0391]: cycle detected when const-evaluating `Y::A::{{initializer}}`
132
--> $DIR/issue-23302-2.rs:14:9
143
|
154
LL | A = Y::B as isize, //~ ERROR E0391
165
| ^^^^
17-
= note: ...which then again requires const-evaluating `Y::A::{{initializer}}`, completing the cycle.
6+
|
7+
note: ...which requires computing layout of `Y`...
8+
= note: ...which again requires const-evaluating `Y::A::{{initializer}}`, completing the cycle
189

1910
error: aborting due to previous error
2011

src/test/ui/issue-23302-3.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
const A: i32 = B;
11+
const A: i32 = B; //~ ERROR cycle detected
1212

13-
const B: i32 = A; //~ ERROR cyclic dependency detected
13+
const B: i32 = A;
1414

1515
fn main() { }

src/test/ui/issue-23302-3.stderr

+12-17
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,25 @@
1-
error[E0391]: cyclic dependency detected
2-
--> $DIR/issue-23302-3.rs:13:16
3-
|
4-
LL | const B: i32 = A; //~ ERROR cyclic dependency detected
5-
| ^ cyclic reference
6-
|
7-
note: the cycle begins when const checking if rvalue is promotable to static `A`...
1+
error[E0391]: cycle detected when const checking if rvalue is promotable to static `A`
82
--> $DIR/issue-23302-3.rs:11:1
93
|
10-
LL | const A: i32 = B;
4+
LL | const A: i32 = B; //~ ERROR cycle detected
115
| ^^^^^^^^^^^^^^^^^
12-
note: ...which then requires checking which parts of `A` are promotable to static...
13-
--> $DIR/issue-23302-3.rs:11:1
146
|
15-
LL | const A: i32 = B;
16-
| ^^^^^^^^^^^^^^^^^
17-
note: ...which then requires const checking if rvalue is promotable to static `B`...
7+
note: ...which requires checking which parts of `A` are promotable to static...
188
--> $DIR/issue-23302-3.rs:11:16
199
|
20-
LL | const A: i32 = B;
10+
LL | const A: i32 = B; //~ ERROR cycle detected
2111
| ^
22-
note: ...which then requires checking which parts of `B` are promotable to static...
12+
note: ...which requires const checking if rvalue is promotable to static `B`...
2313
--> $DIR/issue-23302-3.rs:13:1
2414
|
25-
LL | const B: i32 = A; //~ ERROR cyclic dependency detected
15+
LL | const B: i32 = A;
2616
| ^^^^^^^^^^^^^^^^^
27-
= note: ...which then again requires const checking if rvalue is promotable to static `A`, completing the cycle.
17+
note: ...which requires checking which parts of `B` are promotable to static...
18+
--> $DIR/issue-23302-3.rs:13:16
19+
|
20+
LL | const B: i32 = A;
21+
| ^
22+
= note: ...which again requires const checking if rvalue is promotable to static `A`, completing the cycle
2823

2924
error: aborting due to previous error
3025

0 commit comments

Comments
 (0)