diff options
| author | Jakub Bukaj <jakub@jakub.cc> | 2014-10-29 21:20:06 +0100 |
|---|---|---|
| committer | Jakub Bukaj <jakub@jakub.cc> | 2014-10-29 23:56:22 +0100 |
| commit | 3db13f4892bc06ee038aef01dc9e5daf0451a561 (patch) | |
| tree | d71c926e6222fa604271301de6cdd935f3f5369e /src/test | |
| parent | 1b79303f4996d76e75588705e3ddb64031009564 (diff) | |
| download | rust-3db13f4892bc06ee038aef01dc9e5daf0451a561.tar.gz rust-3db13f4892bc06ee038aef01dc9e5daf0451a561.zip | |
Always drop var IDs from type variables modulo -Z verbose, per PR discussion
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/compile-fail/issue-13482-2.rs | 21 | ||||
| -rw-r--r-- | src/test/compile-fail/issue-13482.rs | 2 | ||||
| -rw-r--r-- | src/test/compile-fail/issue-3680.rs | 4 | ||||
| -rw-r--r-- | src/test/compile-fail/issue-4201.rs | 2 | ||||
| -rw-r--r-- | src/test/compile-fail/issue-4968.rs | 2 | ||||
| -rw-r--r-- | src/test/compile-fail/issue-5100.rs | 2 | ||||
| -rw-r--r-- | src/test/compile-fail/repeat_count.rs | 2 | ||||
| -rw-r--r-- | src/test/compile-fail/slightly-nice-generic-literal-messages.rs | 2 | ||||
| -rw-r--r-- | src/test/compile-fail/suppressed-error.rs | 2 |
9 files changed, 30 insertions, 9 deletions
diff --git a/src/test/compile-fail/issue-13482-2.rs b/src/test/compile-fail/issue-13482-2.rs new file mode 100644 index 00000000000..6746b90e32d --- /dev/null +++ b/src/test/compile-fail/issue-13482-2.rs @@ -0,0 +1,21 @@ +// 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:-Z verbose + +fn main() { + let x = [1,2]; + let y = match x { + [] => None, + //~^ ERROR types: expected `[_#0i, ..2]`, found `[_#7, ..0]` + // (expected array of 2 elements, found array of 0 elements) + [a,_] => Some(a) + }; +} diff --git a/src/test/compile-fail/issue-13482.rs b/src/test/compile-fail/issue-13482.rs index 0139a2ff710..e0b1f8845e2 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 types: expected `[_#0i, ..2]`, found `[_#7, ..0]` +//~^ ERROR types: expected `[_#i, ..2]`, found `[_, ..0]` // (expected array of 2 elements, found array of 0 elements) [a,_] => Some(a) }; diff --git a/src/test/compile-fail/issue-3680.rs b/src/test/compile-fail/issue-3680.rs index a23f76bd15b..f018a02a945 100644 --- a/src/test/compile-fail/issue-3680.rs +++ b/src/test/compile-fail/issue-3680.rs @@ -11,7 +11,7 @@ fn main() { match None { Err(_) => () - //~^ ERROR mismatched types: expected `core::option::Option<_#1>` - // , found `core::result::Result<_#2, _#3>` + //~^ ERROR mismatched types: expected `core::option::Option<_>` + // , found `core::result::Result<_, _>` } } diff --git a/src/test/compile-fail/issue-4201.rs b/src/test/compile-fail/issue-4201.rs index 69bcfc019c0..5899fa43a48 100644 --- a/src/test/compile-fail/issue-4201.rs +++ b/src/test/compile-fail/issue-4201.rs @@ -12,7 +12,7 @@ fn main() { let a = if true { 0 } else if false { -//~^ ERROR if may be missing an else clause: expected `()`, found `_#1i` +//~^ ERROR if may be missing an else clause: expected `()`, found `_#i` 1 }; } diff --git a/src/test/compile-fail/issue-4968.rs b/src/test/compile-fail/issue-4968.rs index 8311d6fd563..54fd9d492bf 100644 --- a/src/test/compile-fail/issue-4968.rs +++ b/src/test/compile-fail/issue-4968.rs @@ -13,6 +13,6 @@ const A: (int,int) = (4,2); fn main() { match 42 { A => () } - //~^ ERROR mismatched types: expected `_#0i`, found `(int, int)` + //~^ ERROR mismatched types: expected `_#i`, found `(int, int)` // (expected integral variable, found tuple) } diff --git a/src/test/compile-fail/issue-5100.rs b/src/test/compile-fail/issue-5100.rs index be7bd248614..ddd82af01a7 100644 --- a/src/test/compile-fail/issue-5100.rs +++ b/src/test/compile-fail/issue-5100.rs @@ -19,7 +19,7 @@ fn main() { match (true, false) { (true, false, false) => () -//~^ ERROR mismatched types: expected `(bool, bool)`, found `(_#9, _#10, _#11)` +//~^ ERROR mismatched types: expected `(bool, bool)`, found `(_, _, _)` } match (true, false) { diff --git a/src/test/compile-fail/repeat_count.rs b/src/test/compile-fail/repeat_count.rs index 6a1603fbfcb..0d4dab9916d 100644 --- a/src/test/compile-fail/repeat_count.rs +++ b/src/test/compile-fail/repeat_count.rs @@ -18,7 +18,7 @@ fn main() { let c = [0, ..true]; //~ ERROR expected positive integer for repeat count, found boolean //~^ ERROR: expected `uint`, found `bool` let d = [0, ..0.5]; //~ ERROR expected positive integer for repeat count, found float - //~^ ERROR: expected `uint`, found `_#0f` + //~^ ERROR: expected `uint`, found `_#f` let e = [0, .."foo"]; //~ ERROR expected positive integer for repeat count, found string //~^ ERROR: expected `uint`, found `&'static str` let f = [0, ..-4]; diff --git a/src/test/compile-fail/slightly-nice-generic-literal-messages.rs b/src/test/compile-fail/slightly-nice-generic-literal-messages.rs index 02ebbb134f0..3ac3988bad2 100644 --- a/src/test/compile-fail/slightly-nice-generic-literal-messages.rs +++ b/src/test/compile-fail/slightly-nice-generic-literal-messages.rs @@ -13,7 +13,7 @@ struct Foo<T,U>(T); fn main() { match Foo(1.1) { 1 => {} - //~^ ERROR expected `Foo<_#0f, _#2>`, found `_#0i` + //~^ ERROR expected `Foo<_#f, _>`, found `_#i` } } diff --git a/src/test/compile-fail/suppressed-error.rs b/src/test/compile-fail/suppressed-error.rs index bd9f2c36328..27f50be528c 100644 --- a/src/test/compile-fail/suppressed-error.rs +++ b/src/test/compile-fail/suppressed-error.rs @@ -10,6 +10,6 @@ fn main() { let (x, y) = (); -//~^ ERROR expected `()`, found `(_#3, _#4)` (expected (), found tuple) +//~^ ERROR expected `()`, found `(_, _)` (expected (), found tuple) return x; } |
