about summary refs log tree commit diff
diff options
context:
space:
mode:
authorCorey Farwell <coreyf@rwell.org>2017-05-05 17:35:29 -0400
committerGitHub <noreply@github.com>2017-05-05 17:35:29 -0400
commit1ef0aef777056ad550a6d353c4038753014d71d5 (patch)
treef2e899d0b164483bf0c27efa3a67683fce214d53
parent26e067b058102e3dcfef461a3f45f403fd456bb8 (diff)
parent4c1a5054f08ddee3de4481a83eb0c8c1f9d36ab7 (diff)
downloadrust-1ef0aef777056ad550a6d353c4038753014d71d5.tar.gz
rust-1ef0aef777056ad550a6d353c4038753014d71d5.zip
Rollup merge of #41761 - euclio:24106-test, r=estebank
Add regression test for issue #24106

Fixes #24106.
-rw-r--r--src/test/run-pass-fulldeps/auxiliary/issue_24106.rs23
-rw-r--r--src/test/run-pass-fulldeps/issue_24106.rs17
2 files changed, 40 insertions, 0 deletions
diff --git a/src/test/run-pass-fulldeps/auxiliary/issue_24106.rs b/src/test/run-pass-fulldeps/auxiliary/issue_24106.rs
new file mode 100644
index 00000000000..745fbbe769e
--- /dev/null
+++ b/src/test/run-pass-fulldeps/auxiliary/issue_24106.rs
@@ -0,0 +1,23 @@
+// 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![crate_type="lib"]
+
+enum E { E0 = 0, E1 = 1 }
+const E0_U8: u8 = E::E0 as u8;
+const E1_U8: u8 = E::E1 as u8;
+
+pub fn go<T>() {
+    match 0 {
+        E0_U8 => (),
+        E1_U8 => (),
+        _ => (),
+    }
+}
diff --git a/src/test/run-pass-fulldeps/issue_24106.rs b/src/test/run-pass-fulldeps/issue_24106.rs
new file mode 100644
index 00000000000..7cfd11537f4
--- /dev/null
+++ b/src/test/run-pass-fulldeps/issue_24106.rs
@@ -0,0 +1,17 @@
+// 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// aux-build:issue_24106.rs
+
+extern crate issue_24106;
+
+fn main() {
+    issue_24106::go::<()>();
+}