diff options
| author | Wesley Wiser <wwiser@gmail.com> | 2018-07-19 23:30:42 -0400 |
|---|---|---|
| committer | Wesley Wiser <wwiser@gmail.com> | 2018-07-23 21:24:38 -0400 |
| commit | 715005c1a76129f7d2c0e85f2ef0af96a8c2add6 (patch) | |
| tree | d3b924c0b2e8ff30993a7d8e1036d479094a3055 | |
| parent | 3290774fa999d93f3b44b6830f2ad42e06ebe43c (diff) | |
| download | rust-715005c1a76129f7d2c0e85f2ef0af96a8c2add6.tar.gz rust-715005c1a76129f7d2c0e85f2ef0af96a8c2add6.zip | |
Update compile-fail tests to be ui tests
| -rw-r--r-- | src/test/compile-fail/issue-34784.rs | 20 | ||||
| -rw-r--r-- | src/test/ui/issue-42060.rs (renamed from src/test/compile-fail/issue-42060.rs) | 0 | ||||
| -rw-r--r-- | src/test/ui/issue-42060.stderr | 28 | ||||
| -rw-r--r-- | src/test/ui/issue-43196.rs (renamed from src/test/compile-fail/issue-43196.rs) | 0 | ||||
| -rw-r--r-- | src/test/ui/issue-43196.stderr | 16 |
5 files changed, 44 insertions, 20 deletions
diff --git a/src/test/compile-fail/issue-34784.rs b/src/test/compile-fail/issue-34784.rs deleted file mode 100644 index 5c510b4a10d..00000000000 --- a/src/test/compile-fail/issue-34784.rs +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright 2018 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or -// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license -// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -const C: *const [u8; 4] = b"abcd"; - -fn main() { - match C { - C => {} - //~^ ERROR this expression will panic at runtime - _ => {} - } -} - diff --git a/src/test/compile-fail/issue-42060.rs b/src/test/ui/issue-42060.rs index 23df42d03c4..23df42d03c4 100644 --- a/src/test/compile-fail/issue-42060.rs +++ b/src/test/ui/issue-42060.rs diff --git a/src/test/ui/issue-42060.stderr b/src/test/ui/issue-42060.stderr new file mode 100644 index 00000000000..69abac8ee7e --- /dev/null +++ b/src/test/ui/issue-42060.stderr @@ -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`. diff --git a/src/test/compile-fail/issue-43196.rs b/src/test/ui/issue-43196.rs index ff53c9a5a54..ff53c9a5a54 100644 --- a/src/test/compile-fail/issue-43196.rs +++ b/src/test/ui/issue-43196.rs diff --git a/src/test/ui/issue-43196.stderr b/src/test/ui/issue-43196.stderr new file mode 100644 index 00000000000..2418f517168 --- /dev/null +++ b/src/test/ui/issue-43196.stderr @@ -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 + |
