From 95436c6d897881262a018dd48ed862eb63a20dc1 Mon Sep 17 00:00:00 2001 From: Venkata Giri Reddy Date: Thu, 25 May 2017 17:57:16 -0400 Subject: [PATCH] regression test for #37665 regression test for #37550 --- src/test/compile-fail/issue-37665.rs | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 src/test/compile-fail/issue-37665.rs diff --git a/src/test/compile-fail/issue-37665.rs b/src/test/compile-fail/issue-37665.rs new file mode 100644 index 00000000000..f86f570d25d --- /dev/null +++ b/src/test/compile-fail/issue-37665.rs @@ -0,0 +1,20 @@ +// Copyright 2017 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. + +// compile-flags: -Z unstable-options --unpretty=mir + +use std::path::MAIN_SEPARATOR; + +fn main() { + let mut foo : String = "hello".to_string(); + foo.push(MAIN_SEPARATOR); + println!("{}", foo); + let x: () = 0; //~ ERROR: mismatched types +}