Skip to content

Commit

Permalink
Update compile-fail tests to be ui tests
Browse files Browse the repository at this point in the history
  • Loading branch information
wesleywiser committed Jul 20, 2018
1 parent ea495e3 commit 3e0cb23
Show file tree
Hide file tree
Showing 6 changed files with 54 additions and 0 deletions.
File renamed without changes.
10 changes: 10 additions & 0 deletions src/test/ui/issue-34784.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
error: this expression will panic at runtime
--> $DIR/issue-34784.rs:15:9
|
LL | C => {}
| ^ "pointer arithmetic or comparison" needs an rfc before being allowed inside constants
|
= note: #[deny(const_err)] on by default

error: aborting due to previous error

File renamed without changes.
28 changes: 28 additions & 0 deletions src/test/ui/issue-42060.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
error[E0435]: attempt to use a non-constant value in a constant
--> $DIR/issue-42060.rs:13:23
|
LL | let other: typeof(thing) = thing; //~ ERROR attempt to use a non-constant value in a constant
| ^^^^^ non-constant value

error[E0435]: attempt to use a non-constant value in a constant
--> $DIR/issue-42060.rs:19:13
|
LL | <typeof(q)>::N //~ ERROR attempt to use a non-constant value in a constant
| ^ non-constant value

error[E0516]: `typeof` is a reserved keyword but unimplemented
--> $DIR/issue-42060.rs:13:16
|
LL | let other: typeof(thing) = thing; //~ ERROR attempt to use a non-constant value in a constant
| ^^^^^^^^^^^^^ reserved keyword

error[E0516]: `typeof` is a reserved keyword but unimplemented
--> $DIR/issue-42060.rs:19:6
|
LL | <typeof(q)>::N //~ ERROR attempt to use a non-constant value in a constant
| ^^^^^^^^^ reserved keyword

error: aborting due to 4 previous errors

Some errors occurred: E0435, E0516.
For more information about an error, try `rustc --explain E0435`.
File renamed without changes.
16 changes: 16 additions & 0 deletions src/test/ui/issue-43196.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
error: expected `|`, found `}`
--> $DIR/issue-43196.rs:13:1
|
LL | |
| - expected `|` here
LL | }
| ^ unexpected token

error: expected item, found `|`
--> $DIR/issue-43196.rs:15:1
|
LL | |
| ^ expected item

error: aborting due to 2 previous errors

0 comments on commit 3e0cb23

Please sign in to comment.