Skip to content

Commit 468254b

Browse files
committed
Update tests
1 parent 69d18a3 commit 468254b

13 files changed

+181
-36
lines changed

src/test/ui/cycle-trait/cycle-trait-default-type-trait.stderr

+5
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ LL | trait Foo<X = Box<Foo>> {
55
| ^^^
66
|
77
= note: ...which again requires processing `Foo::X`, completing the cycle
8+
note: cycle used when collecting item types in top-level module
9+
--> $DIR/cycle-trait-default-type-trait.rs:4:1
10+
|
11+
LL | trait Foo<X = Box<Foo>> {
12+
| ^^^^^^^^^^^^^^^^^^^^^^^
813

914
error: aborting due to previous error
1015

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

+5
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ LL | trait Chromosome: Chromosome {
55
| ^^^^^^^^^^
66
|
77
= note: ...which again requires computing the supertraits of `Chromosome`, completing the cycle
8+
note: cycle used when collecting item types in top-level module
9+
--> $DIR/cycle-trait-supertrait-direct.rs:3:1
10+
|
11+
LL | trait Chromosome: Chromosome {
12+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
813

914
error: aborting due to previous error
1015

src/test/ui/existential_types/no_inferrable_concrete_type.stderr

+11
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,17 @@ note: ...which requires processing `bar`...
1010
LL | fn bar(x: Foo) -> Foo { x }
1111
| ^^^^^
1212
= note: ...which again requires processing `Foo`, completing the cycle
13+
note: cycle used when collecting item types in top-level module
14+
--> $DIR/no_inferrable_concrete_type.rs:4:1
15+
|
16+
LL | / #![feature(existential_type)]
17+
LL | |
18+
LL | | existential type Foo: Copy; //~ cycle detected
19+
LL | |
20+
... |
21+
LL | | let _: Foo = std::mem::transmute(0u8);
22+
LL | | }
23+
| |_^
1324

1425
error: aborting due to previous error
1526

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

+22
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,17 @@ LL | fn cycle2() -> impl Clone {
2222
| ^^^^^^^^^^^^^^^^^^^^^^^^^
2323
note: ...which requires evaluating trait selection obligation `impl std::clone::Clone: std::marker::Send`...
2424
= note: ...which again requires processing `cycle1::{{impl-Trait}}`, completing the cycle
25+
note: cycle used when checking item types in top-level module
26+
--> $DIR/auto-trait-leak.rs:3:1
27+
|
28+
LL | / use std::cell::Cell;
29+
LL | | use std::rc::Rc;
30+
LL | |
31+
LL | | fn send<T: Send>(_: T) {}
32+
... |
33+
LL | | Rc::new(String::from("foo"))
34+
LL | | }
35+
| |_^
2536

2637
error[E0391]: cycle detected when processing `cycle1::{{impl-Trait}}`
2738
--> $DIR/auto-trait-leak.rs:14:16
@@ -46,6 +57,17 @@ note: ...which requires processing `cycle2`...
4657
LL | fn cycle2() -> impl Clone {
4758
| ^^^^^^^^^^^^^^^^^^^^^^^^^
4859
= note: ...which again requires processing `cycle1::{{impl-Trait}}`, completing the cycle
60+
note: cycle used when checking item types in top-level module
61+
--> $DIR/auto-trait-leak.rs:3:1
62+
|
63+
LL | / use std::cell::Cell;
64+
LL | | use std::rc::Rc;
65+
LL | |
66+
LL | | fn send<T: Send>(_: T) {}
67+
... |
68+
LL | | Rc::new(String::from("foo"))
69+
LL | | }
70+
| |_^
4971

5072
error[E0277]: `std::rc::Rc<std::string::String>` cannot be sent between threads safely
5173
--> $DIR/auto-trait-leak.rs:17:5

src/test/ui/infinite/infinite-vec-type-recursion.stderr

+8
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,14 @@ LL | type X = Vec<X>;
55
| ^
66
|
77
= note: ...which again requires processing `X`, completing the cycle
8+
note: cycle used when collecting item types in top-level module
9+
--> $DIR/infinite-vec-type-recursion.rs:1:1
10+
|
11+
LL | / type X = Vec<X>;
12+
LL | | //~^ ERROR cycle detected
13+
LL | |
14+
LL | | fn main() { let b: X = Vec::new(); }
15+
| |____________________________________^
816

917
error: aborting due to previous error
1018

src/test/ui/issues/issue-12511.stderr

+5
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ note: ...which requires computing the supertraits of `T2`...
1010
LL | trait T2 : T1 {
1111
| ^^
1212
= note: ...which again requires computing the supertraits of `T1`, completing the cycle
13+
note: cycle used when collecting item types in top-level module
14+
--> $DIR/issue-12511.rs:1:1
15+
|
16+
LL | trait T1 : T2 {
17+
| ^^^^^^^^^^^^^
1318

1419
error: aborting due to previous error
1520

src/test/ui/issues/issue-20772.stderr

+8
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,14 @@ LL | | {}
88
| |__^
99
|
1010
= note: ...which again requires computing the supertraits of `T`, completing the cycle
11+
note: cycle used when collecting item types in top-level module
12+
--> $DIR/issue-20772.rs:1:1
13+
|
14+
LL | / trait T : Iterator<Item=Self::Item>
15+
LL | | //~^ ERROR cycle detected
16+
LL | | //~| ERROR associated type `Item` not found for `Self`
17+
LL | | {}
18+
| |__^
1119

1220
error[E0220]: associated type `Item` not found for `Self`
1321
--> $DIR/issue-20772.rs:1:25

src/test/ui/issues/issue-20825.stderr

+5
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ LL | pub trait Processor: Subscriber<Input = Self::Input> {
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
66
|
77
= note: ...which again requires computing the supertraits of `Processor`, completing the cycle
8+
note: cycle used when collecting item types in top-level module
9+
--> $DIR/issue-20825.rs:5:1
10+
|
11+
LL | pub trait Processor: Subscriber<Input = Self::Input> {
12+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
813

914
error: aborting due to previous error
1015

src/test/ui/issues/issue-22673.stderr

+5
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ LL | trait Expr : PartialEq<Self::Item> {
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
66
|
77
= note: ...which again requires computing the supertraits of `Expr`, completing the cycle
8+
note: cycle used when collecting item types in top-level module
9+
--> $DIR/issue-22673.rs:1:1
10+
|
11+
LL | trait Expr : PartialEq<Self::Item> {
12+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
813

914
error: aborting due to previous error
1015

src/test/ui/issues/issue-34373.stderr

+11
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,17 @@ note: ...which requires processing `DefaultFoo`...
1010
LL | type DefaultFoo = Foo;
1111
| ^^^
1212
= note: ...which again requires processing `Foo::T`, completing the cycle
13+
note: cycle used when collecting item types in top-level module
14+
--> $DIR/issue-34373.rs:1:1
15+
|
16+
LL | / #![allow(warnings)]
17+
LL | |
18+
LL | | trait Trait<T> {
19+
LL | | fn foo(_: T) {}
20+
... |
21+
LL | | fn main() {
22+
LL | | }
23+
| |_^
1324

1425
error: aborting due to previous error
1526

src/test/ui/resolve/issue-23305.stderr

+5
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ LL | impl ToNbt<Self> {}
55
| ^^^^
66
|
77
= note: ...which again requires processing `<impl at $DIR/issue-23305.rs:5:1: 5:20>`, completing the cycle
8+
note: cycle used when collecting item types in top-level module
9+
--> $DIR/issue-23305.rs:1:1
10+
|
11+
LL | pub trait ToNbt<T> {
12+
| ^^^^^^^^^^^^^^^^^^
813

914
error: aborting due to previous error
1015

src/test/ui/resolve/resolve-self-in-impl.stderr

+55
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,17 @@ LL | impl Tr for Self {} //~ ERROR cycle detected
55
| ^^^^
66
|
77
= note: ...which again requires processing `<impl at $DIR/resolve-self-in-impl.rs:14:1: 14:20>`, completing the cycle
8+
note: cycle used when collecting item types in top-level module
9+
--> $DIR/resolve-self-in-impl.rs:1:1
10+
|
11+
LL | / #![feature(associated_type_defaults)]
12+
LL | |
13+
LL | | struct S<T = u8>(T);
14+
LL | | trait Tr<T = u8> {
15+
... |
16+
LL | |
17+
LL | | fn main() {}
18+
| |____________^
819

920
error[E0391]: cycle detected when processing `<impl at $DIR/resolve-self-in-impl.rs:15:1: 15:23>`
1021
--> $DIR/resolve-self-in-impl.rs:15:15
@@ -13,6 +24,17 @@ LL | impl Tr for S<Self> {} //~ ERROR cycle detected
1324
| ^^^^
1425
|
1526
= note: ...which again requires processing `<impl at $DIR/resolve-self-in-impl.rs:15:1: 15:23>`, completing the cycle
27+
note: cycle used when collecting item types in top-level module
28+
--> $DIR/resolve-self-in-impl.rs:1:1
29+
|
30+
LL | / #![feature(associated_type_defaults)]
31+
LL | |
32+
LL | | struct S<T = u8>(T);
33+
LL | | trait Tr<T = u8> {
34+
... |
35+
LL | |
36+
LL | | fn main() {}
37+
| |____________^
1638

1739
error[E0391]: cycle detected when processing `<impl at $DIR/resolve-self-in-impl.rs:16:1: 16:13>`
1840
--> $DIR/resolve-self-in-impl.rs:16:6
@@ -21,6 +43,17 @@ LL | impl Self {} //~ ERROR cycle detected
2143
| ^^^^
2244
|
2345
= note: ...which again requires processing `<impl at $DIR/resolve-self-in-impl.rs:16:1: 16:13>`, completing the cycle
46+
note: cycle used when collecting item types in top-level module
47+
--> $DIR/resolve-self-in-impl.rs:1:1
48+
|
49+
LL | / #![feature(associated_type_defaults)]
50+
LL | |
51+
LL | | struct S<T = u8>(T);
52+
LL | | trait Tr<T = u8> {
53+
... |
54+
LL | |
55+
LL | | fn main() {}
56+
| |____________^
2457

2558
error[E0391]: cycle detected when processing `<impl at $DIR/resolve-self-in-impl.rs:17:1: 17:16>`
2659
--> $DIR/resolve-self-in-impl.rs:17:8
@@ -29,6 +62,17 @@ LL | impl S<Self> {} //~ ERROR cycle detected
2962
| ^^^^
3063
|
3164
= note: ...which again requires processing `<impl at $DIR/resolve-self-in-impl.rs:17:1: 17:16>`, completing the cycle
65+
note: cycle used when collecting item types in top-level module
66+
--> $DIR/resolve-self-in-impl.rs:1:1
67+
|
68+
LL | / #![feature(associated_type_defaults)]
69+
LL | |
70+
LL | | struct S<T = u8>(T);
71+
LL | | trait Tr<T = u8> {
72+
... |
73+
LL | |
74+
LL | | fn main() {}
75+
| |____________^
3276

3377
error[E0391]: cycle detected when processing `<impl at $DIR/resolve-self-in-impl.rs:18:1: 18:26>`
3478
--> $DIR/resolve-self-in-impl.rs:18:1
@@ -37,6 +81,17 @@ LL | impl Tr<Self::A> for S {} //~ ERROR cycle detected
3781
| ^^^^^^^^^^^^^^^^^^^^^^
3882
|
3983
= note: ...which again requires processing `<impl at $DIR/resolve-self-in-impl.rs:18:1: 18:26>`, completing the cycle
84+
note: cycle used when collecting item types in top-level module
85+
--> $DIR/resolve-self-in-impl.rs:1:1
86+
|
87+
LL | / #![feature(associated_type_defaults)]
88+
LL | |
89+
LL | | struct S<T = u8>(T);
90+
LL | | trait Tr<T = u8> {
91+
... |
92+
LL | |
93+
LL | | fn main() {}
94+
| |____________^
4095

4196
error: aborting due to 5 previous errors
4297

Original file line numberDiff line numberDiff line change
@@ -1,39 +1,3 @@
1-
error[E0442]: intrinsic argument 1 has wrong type: found `u16`, expected `i16`
2-
--> $DIR/simd-intrinsic-declaration-type.rs:33:9
3-
|
4-
LL | fn x86_mm_adds_epi16(x: u16x8, y: u16x8) -> u16x8;
5-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6-
7-
error[E0442]: intrinsic argument 2 has wrong type: found `u16`, expected `i16`
8-
--> $DIR/simd-intrinsic-declaration-type.rs:33:9
9-
|
10-
LL | fn x86_mm_adds_epi16(x: u16x8, y: u16x8) -> u16x8;
11-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
12-
13-
error[E0442]: intrinsic return value has wrong type: found `u16`, expected `i16`
14-
--> $DIR/simd-intrinsic-declaration-type.rs:33:9
15-
|
16-
LL | fn x86_mm_adds_epi16(x: u16x8, y: u16x8) -> u16x8;
17-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
18-
19-
error[E0442]: intrinsic argument 1 has wrong type: found `i16`, expected `u16`
20-
--> $DIR/simd-intrinsic-declaration-type.rs:37:9
21-
|
22-
LL | fn x86_mm_adds_epu16(x: i16x8, y: i16x8) -> i16x8;
23-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
24-
25-
error[E0442]: intrinsic argument 2 has wrong type: found `i16`, expected `u16`
26-
--> $DIR/simd-intrinsic-declaration-type.rs:37:9
27-
|
28-
LL | fn x86_mm_adds_epu16(x: i16x8, y: i16x8) -> i16x8;
29-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
30-
31-
error[E0442]: intrinsic return value has wrong type: found `i16`, expected `u16`
32-
--> $DIR/simd-intrinsic-declaration-type.rs:37:9
33-
|
34-
LL | fn x86_mm_adds_epu16(x: i16x8, y: i16x8) -> i16x8;
35-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
36-
371
error[E0442]: intrinsic argument 1 has wrong type: found vector with length 16, expected length 8
382
--> $DIR/simd-intrinsic-declaration-type.rs:45:5
393
|
@@ -70,6 +34,42 @@ error[E0442]: intrinsic return value has wrong type: found `i32`, expected `f32`
7034
LL | fn x86_mm_max_ps(x: i32x4, y: i32x4) -> i32x4;
7135
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
7236

37+
error[E0442]: intrinsic argument 1 has wrong type: found `u16`, expected `i16`
38+
--> $DIR/simd-intrinsic-declaration-type.rs:33:9
39+
|
40+
LL | fn x86_mm_adds_epi16(x: u16x8, y: u16x8) -> u16x8;
41+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
42+
43+
error[E0442]: intrinsic argument 2 has wrong type: found `u16`, expected `i16`
44+
--> $DIR/simd-intrinsic-declaration-type.rs:33:9
45+
|
46+
LL | fn x86_mm_adds_epi16(x: u16x8, y: u16x8) -> u16x8;
47+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
48+
49+
error[E0442]: intrinsic return value has wrong type: found `u16`, expected `i16`
50+
--> $DIR/simd-intrinsic-declaration-type.rs:33:9
51+
|
52+
LL | fn x86_mm_adds_epi16(x: u16x8, y: u16x8) -> u16x8;
53+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
54+
55+
error[E0442]: intrinsic argument 1 has wrong type: found `i16`, expected `u16`
56+
--> $DIR/simd-intrinsic-declaration-type.rs:37:9
57+
|
58+
LL | fn x86_mm_adds_epu16(x: i16x8, y: i16x8) -> i16x8;
59+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
60+
61+
error[E0442]: intrinsic argument 2 has wrong type: found `i16`, expected `u16`
62+
--> $DIR/simd-intrinsic-declaration-type.rs:37:9
63+
|
64+
LL | fn x86_mm_adds_epu16(x: i16x8, y: i16x8) -> i16x8;
65+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
66+
67+
error[E0442]: intrinsic return value has wrong type: found `i16`, expected `u16`
68+
--> $DIR/simd-intrinsic-declaration-type.rs:37:9
69+
|
70+
LL | fn x86_mm_adds_epu16(x: i16x8, y: i16x8) -> i16x8;
71+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
72+
7373
error: aborting due to 12 previous errors
7474

7575
For more information about this error, try `rustc --explain E0442`.

0 commit comments

Comments
 (0)