diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/issues/issue-6344-match.rs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/test/ui/issues/issue-6344-match.rs b/src/test/ui/issues/issue-6344-match.rs new file mode 100644 index 000000000..4505a34c7 --- /dev/null +++ b/src/test/ui/issues/issue-6344-match.rs @@ -0,0 +1,18 @@ +// run-pass +#![allow(non_shorthand_field_patterns)] + +struct A { x: usize } + +impl Drop for A { + fn drop(&mut self) {} +} + +pub fn main() { + let a = A { x: 0 }; + + match a { + A { x : ref x } => { + println!("{}", x) + } + } +} |