diff options
| author | bors <bors@rust-lang.org> | 2014-10-05 10:57:04 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-10-05 10:57:04 +0000 |
| commit | c586490715a35d3c9dae17de7f8907c2f73168d3 (patch) | |
| tree | 52b24e796acafe2ecc781a8ce920eae97080caaa /src/test/compile-fail | |
| parent | dfbe9eb3b24fdc7ea5c78f96fedec6630476dec7 (diff) | |
| parent | cc31d9cabcc6c8ad396c1aae6257a4b5ea25cb46 (diff) | |
| download | rust-c586490715a35d3c9dae17de7f8907c2f73168d3.tar.gz rust-c586490715a35d3c9dae17de7f8907c2f73168d3.zip | |
auto merge of #17785 : P1start/rust/diagnostics, r=alexcrichton
Closes #17765. Closes #15524. Closes #14772.
Diffstat (limited to 'src/test/compile-fail')
| -rw-r--r-- | src/test/compile-fail/issue-13482.rs | 2 | ||||
| -rw-r--r-- | src/test/compile-fail/issue-14772.rs | 16 | ||||
| -rw-r--r-- | src/test/compile-fail/issue-15524.rs | 24 | ||||
| -rw-r--r-- | src/test/compile-fail/match-vec-mismatch-2.rs | 2 | ||||
| -rw-r--r-- | src/test/compile-fail/tag-variant-disr-dup.rs | 2 |
5 files changed, 43 insertions, 3 deletions
diff --git a/src/test/compile-fail/issue-13482.rs b/src/test/compile-fail/issue-13482.rs index e5d87395286..2c7b56f9dc7 100644 --- a/src/test/compile-fail/issue-13482.rs +++ b/src/test/compile-fail/issue-13482.rs @@ -12,7 +12,7 @@ fn main() { let x = [1,2]; let y = match x { [] => None, -//~^ ERROR expected `[<generic integer #0>, ..2]`, found a fixed vector pattern of size 0 +//~^ ERROR expected `[<generic integer #0>, ..2]`, found a fixed array pattern of size 0 [a,_] => Some(a) }; } diff --git a/src/test/compile-fail/issue-14772.rs b/src/test/compile-fail/issue-14772.rs new file mode 100644 index 00000000000..aaaad67be52 --- /dev/null +++ b/src/test/compile-fail/issue-14772.rs @@ -0,0 +1,16 @@ +// Copyright 2014 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. + +// compile-flags: --test + +#[test] +mod foo {} //~ ERROR only functions may be used as tests + +fn main() {} diff --git a/src/test/compile-fail/issue-15524.rs b/src/test/compile-fail/issue-15524.rs new file mode 100644 index 00000000000..1e7bd6fc623 --- /dev/null +++ b/src/test/compile-fail/issue-15524.rs @@ -0,0 +1,24 @@ +// Copyright 2014 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. + +static N: int = 1; + +enum Foo { + A = 1, + B = 1, //~ ERROR discriminant value `1` already exists + //~^^ NOTE conflicting + C = 0, + D, //~ ERROR discriminant value `1` already exists + //~^^^^^ NOTE conflicting + E = N, //~ ERROR discriminant value `1` already exists + //~^^^^^^^ NOTE conflicting +} + +fn main() {} diff --git a/src/test/compile-fail/match-vec-mismatch-2.rs b/src/test/compile-fail/match-vec-mismatch-2.rs index fee49ad8fdb..e095c7c2408 100644 --- a/src/test/compile-fail/match-vec-mismatch-2.rs +++ b/src/test/compile-fail/match-vec-mismatch-2.rs @@ -10,6 +10,6 @@ fn main() { match () { - [()] => { } //~ ERROR mismatched types: expected `()`, found a vector pattern + [()] => { } //~ ERROR mismatched types: expected `()`, found an array pattern } } diff --git a/src/test/compile-fail/tag-variant-disr-dup.rs b/src/test/compile-fail/tag-variant-disr-dup.rs index d0608ec4c19..5da5bb85409 100644 --- a/src/test/compile-fail/tag-variant-disr-dup.rs +++ b/src/test/compile-fail/tag-variant-disr-dup.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -//error-pattern:discriminant value already exists +//error-pattern:discriminant value // black and white have the same discriminator value ... |
