Skip to content

Commit d3f8b8b

Browse files
committed
Move hygiene tests to UI
1 parent 4f69b7f commit d3f8b8b

25 files changed

+223
-0
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
error[E0407]: method `method` is not a member of trait `Tr`
2+
--> $DIR/assoc_item_ctxt.rs:45:13
3+
|
4+
LL | fn method() {} //~ ERROR method `method` is not a member of trait `Tr`
5+
| ^^^^^^^^^^^^^^ not a member of trait `Tr`
6+
...
7+
LL | mac_trait_impl!();
8+
| ------------------ in this macro invocation
9+
10+
error[E0046]: not all trait items implemented, missing: `method`
11+
--> $DIR/assoc_item_ctxt.rs:44:9
12+
|
13+
LL | fn method();
14+
| ------------ `method` from trait
15+
...
16+
LL | impl Tr for u8 { //~ ERROR not all trait items implemented, missing: `method`
17+
| ^^^^^^^^^^^^^^ missing `method` in implementation
18+
...
19+
LL | mac_trait_impl!();
20+
| ------------------ in this macro invocation
21+
22+
error: aborting due to 2 previous errors
23+
24+
Some errors occurred: E0046, E0407.
25+
For more information about an error, try `rustc --explain E0046`.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
error: compilation successful
2+
--> $DIR/assoc_ty_bindings.rs:49:1
3+
|
4+
LL | fn main() {} //~ ERROR compilation successful
5+
| ^^^^^^^^^^^^
6+
7+
error: aborting due to previous error
8+

src/test/ui/hygiene/fields.stderr

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
error: type `foo::S` is private
2+
--> $DIR/fields.rs:25:17
3+
|
4+
LL | let s = S { x: 0 }; //~ ERROR type `foo::S` is private
5+
| ^^^^^^^^^^
6+
...
7+
LL | let s = foo::m!(S, x);
8+
| ------------- in this macro invocation
9+
10+
error: type `foo::S` is private
11+
--> $DIR/fields.rs:26:17
12+
|
13+
LL | let _ = s.x; //~ ERROR type `foo::S` is private
14+
| ^
15+
...
16+
LL | let s = foo::m!(S, x);
17+
| ------------- in this macro invocation
18+
19+
error: type `foo::T` is private
20+
--> $DIR/fields.rs:28:17
21+
|
22+
LL | let t = T(0); //~ ERROR type `foo::T` is private
23+
| ^^^^
24+
...
25+
LL | let s = foo::m!(S, x);
26+
| ------------- in this macro invocation
27+
28+
error: type `foo::T` is private
29+
--> $DIR/fields.rs:29:17
30+
|
31+
LL | let _ = t.0; //~ ERROR type `foo::T` is private
32+
| ^
33+
...
34+
LL | let s = foo::m!(S, x);
35+
| ------------- in this macro invocation
36+
37+
error: aborting due to 4 previous errors
38+

src/test/ui/hygiene/for-loop.stderr

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
error[E0425]: cannot find value `iter` in this scope
2+
--> $DIR/for-loop.rs:16:9
3+
|
4+
LL | iter.next(); //~ ERROR cannot find value `iter` in this scope
5+
| ^^^^ not found in this scope
6+
7+
error: aborting due to previous error
8+
9+
For more information about this error, try `rustc --explain E0425`.
File renamed without changes.

0 commit comments

Comments
 (0)