From a05560bebe897bf1fea2b57a2e9f131599784360 Mon Sep 17 00:00:00 2001 From: Andrew Cann Date: Wed, 3 Aug 2016 13:58:59 +0800 Subject: [PATCH] Add run-pass/never_coercions.rs test --- src/test/run-pass/never_coercions.rs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 src/test/run-pass/never_coercions.rs diff --git a/src/test/run-pass/never_coercions.rs b/src/test/run-pass/never_coercions.rs new file mode 100644 index 000000000000..cee2a0a7d529 --- /dev/null +++ b/src/test/run-pass/never_coercions.rs @@ -0,0 +1,19 @@ +// Copyright 2012-2014 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 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +fn main() { + let v: Vec = Vec::new(); + match 0u32 { + 0 => &v, + 1 => return, + _ => &v[..], + }; +} +