diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2016-08-30 10:39:07 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-08-30 10:39:07 +0200 |
| commit | ab8499785cb2dfcb365ca7ac3b0352633a321e9b (patch) | |
| tree | dcfae27903837478e82d6b7328e48153630bb9c2 | |
| parent | 3ee2c9d0a4c72c2b00632baca5623a7f8bfc5de2 (diff) | |
| parent | 9c256ec94bd2270508ded3dfa569b5d440140213 (diff) | |
| download | rust-ab8499785cb2dfcb365ca7ac3b0352633a321e9b.tar.gz rust-ab8499785cb2dfcb365ca7ac3b0352633a321e9b.zip | |
Rollup merge of #36086 - apasel422:issue-35423, r=alexcrichton
Add test for #35423 Closes #35423
| -rw-r--r-- | src/test/run-pass/issue-35423.rs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/test/run-pass/issue-35423.rs b/src/test/run-pass/issue-35423.rs new file mode 100644 index 00000000000..35d0c305ed8 --- /dev/null +++ b/src/test/run-pass/issue-35423.rs @@ -0,0 +1,18 @@ +// Copyright 2016 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. + +fn main () { + let x = 4; + match x { + ref r if *r < 0 => println!("got negative num {} < 0", r), + e @ 1 ... 100 => println!("got number within range [1,100] {}", e), + _ => println!("no"), + } +} |
