diff options
| author | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2015-10-26 21:10:41 +0300 |
|---|---|---|
| committer | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2015-11-19 11:41:09 +0300 |
| commit | 35749923eed9060118878c8cb812bafd32bbcd7e (patch) | |
| tree | 2ea8e1f90d568141e4a7dd6e59f3413bd78b7e95 /src/test | |
| parent | 0f8519c341a53a4697f839041bc0a14dd6c6e773 (diff) | |
| download | rust-35749923eed9060118878c8cb812bafd32bbcd7e.tar.gz rust-35749923eed9060118878c8cb812bafd32bbcd7e.zip | |
Fix the fallout
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/compile-fail/move-fragments-2.rs | 8 | ||||
| -rw-r--r-- | src/test/compile-fail/move-fragments-3.rs | 2 | ||||
| -rw-r--r-- | src/test/run-pass/issue-14308.rs | 9 | ||||
| -rw-r--r-- | src/test/run-pass/issue-1701.rs | 2 |
4 files changed, 6 insertions, 15 deletions
diff --git a/src/test/compile-fail/move-fragments-2.rs b/src/test/compile-fail/move-fragments-2.rs index 1171755c953..15c28ec2713 100644 --- a/src/test/compile-fail/move-fragments-2.rs +++ b/src/test/compile-fail/move-fragments-2.rs @@ -32,7 +32,7 @@ pub fn test_match_partial(p: Lonely<D, D>) { //~^ ERROR parent_of_fragments: `$(local p)` //~| ERROR assigned_leaf_path: `($(local p) as Lonely::Zero)` match p { - Zero(..) => {} + Zero => {} _ => {} } } @@ -44,7 +44,7 @@ pub fn test_match_full(p: Lonely<D, D>) { //~| ERROR assigned_leaf_path: `($(local p) as Lonely::One)` //~| ERROR assigned_leaf_path: `($(local p) as Lonely::Two)` match p { - Zero(..) => {} + Zero => {} One(..) => {} Two(..) => {} } @@ -59,7 +59,7 @@ pub fn test_match_bind_one(p: Lonely<D, D>) { //~| ERROR assigned_leaf_path: `($(local p) as Lonely::Two)` //~| ERROR assigned_leaf_path: `$(local data)` match p { - Zero(..) => {} + Zero => {} One(data) => {} Two(..) => {} } @@ -78,7 +78,7 @@ pub fn test_match_bind_many(p: Lonely<D, D>) { //~| ERROR assigned_leaf_path: `$(local left)` //~| ERROR assigned_leaf_path: `$(local right)` match p { - Zero(..) => {} + Zero => {} One(data) => {} Two(left, right) => {} } diff --git a/src/test/compile-fail/move-fragments-3.rs b/src/test/compile-fail/move-fragments-3.rs index 34b34471f4f..a1152333900 100644 --- a/src/test/compile-fail/move-fragments-3.rs +++ b/src/test/compile-fail/move-fragments-3.rs @@ -38,7 +38,7 @@ pub fn test_match_bind_and_underscore(p: Lonely<D, D>) { //~| ERROR assigned_leaf_path: `$(local left)` match p { - Zero(..) => {} + Zero => {} One(_) => {} // <-- does not fragment `($(local p) as One)` ... diff --git a/src/test/run-pass/issue-14308.rs b/src/test/run-pass/issue-14308.rs index a61cb18faa6..74936411da2 100644 --- a/src/test/run-pass/issue-14308.rs +++ b/src/test/run-pass/issue-14308.rs @@ -10,7 +10,6 @@ struct A(isize); -struct B; fn main() { let x = match A(3) { @@ -22,12 +21,4 @@ fn main() { A(..) => 2 }; assert_eq!(x, 2); - - // This next test uses a (..) wildcard match on a nullary struct. - // There's no particularly good reason to support this, but it's currently allowed, - // and this makes sure it doesn't ICE or break LLVM. - let x = match B { - B(..) => 3 - }; - assert_eq!(x, 3); } diff --git a/src/test/run-pass/issue-1701.rs b/src/test/run-pass/issue-1701.rs index 3a2e46c62b0..49ee99b22a1 100644 --- a/src/test/run-pass/issue-1701.rs +++ b/src/test/run-pass/issue-1701.rs @@ -20,7 +20,7 @@ fn noise(a: animal) -> Option<String> { animal::cat(..) => { Some("meow".to_string()) } animal::dog(..) => { Some("woof".to_string()) } animal::rabbit(..) => { None } - animal::tiger(..) => { Some("roar".to_string()) } + animal::tiger => { Some("roar".to_string()) } } } |
