Move /src/test to /tests
This commit is contained in:
parent
ca855e6e42
commit
cf2dff2b1e
27592 changed files with 0 additions and 0 deletions
14
tests/ui/pattern/bindings-after-at/nested-patterns.rs
Normal file
14
tests/ui/pattern/bindings-after-at/nested-patterns.rs
Normal file
|
@ -0,0 +1,14 @@
|
|||
// run-pass
|
||||
|
||||
|
||||
struct A { a: u8, b: u8 }
|
||||
|
||||
pub fn main() {
|
||||
match (A { a: 10, b: 20 }) {
|
||||
ref x @ A { ref a, b: 20 } => {
|
||||
assert_eq!(x.a, 10);
|
||||
assert_eq!(*a, 10);
|
||||
}
|
||||
A { b: ref _b, .. } => panic!(),
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue