summaryrefslogtreecommitdiffstats
path: root/src/test/ui/issues/issue-49973.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/test/ui/issues/issue-49973.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/test/ui/issues/issue-49973.rs b/src/test/ui/issues/issue-49973.rs
new file mode 100644
index 000000000..af421c52f
--- /dev/null
+++ b/src/test/ui/issues/issue-49973.rs
@@ -0,0 +1,11 @@
+// run-pass
+#[derive(Debug)]
+#[repr(i32)]
+enum E {
+ Min = -2147483648i32,
+ _Max = 2147483647i32,
+}
+
+fn main() {
+ assert_eq!(Some(E::Min).unwrap() as i32, -2147483648i32);
+}