From 9be35f82c1abf2ecbab489bca9eca138ea648312 Mon Sep 17 00:00:00 2001 From: Vadim Petrochenkov Date: Sat, 27 Jul 2019 01:33:01 +0300 Subject: tests: Move run-pass tests without naming conflicts to ui --- src/test/ui/binding/match-ref-binding.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 src/test/ui/binding/match-ref-binding.rs (limited to 'src/test/ui/binding/match-ref-binding.rs') diff --git a/src/test/ui/binding/match-ref-binding.rs b/src/test/ui/binding/match-ref-binding.rs new file mode 100644 index 00000000000..ac6a07eabe1 --- /dev/null +++ b/src/test/ui/binding/match-ref-binding.rs @@ -0,0 +1,12 @@ +// run-pass + +fn destructure(x: Option) -> isize { + match x { + None => 0, + Some(ref v) => *v + } +} + +pub fn main() { + assert_eq!(destructure(Some(22)), 22); +} -- cgit 1.4.1-3-g733a5