tests: Move run-pass tests without naming conflicts to ui
This commit is contained in:
parent
ca9faa52f5
commit
9be35f82c1
3226 changed files with 64 additions and 196 deletions
18
src/test/ui/structs-enums/struct-pattern-matching.rs
Normal file
18
src/test/ui/structs-enums/struct-pattern-matching.rs
Normal file
|
@ -0,0 +1,18 @@
|
|||
// run-pass
|
||||
#![allow(non_shorthand_field_patterns)]
|
||||
|
||||
struct Foo {
|
||||
x: isize,
|
||||
y: isize,
|
||||
}
|
||||
|
||||
pub fn main() {
|
||||
let a = Foo { x: 1, y: 2 };
|
||||
match a {
|
||||
Foo { x: x, y: y } => println!("yes, {}, {}", x, y)
|
||||
}
|
||||
|
||||
match a {
|
||||
Foo { .. } => ()
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue