summaryrefslogtreecommitdiffstats
path: root/tests/ui/const_prop/unreachable-overflow.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/const_prop/unreachable-overflow.rs')
-rw-r--r--tests/ui/const_prop/unreachable-overflow.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/ui/const_prop/unreachable-overflow.rs b/tests/ui/const_prop/unreachable-overflow.rs
new file mode 100644
index 000000000..287513542
--- /dev/null
+++ b/tests/ui/const_prop/unreachable-overflow.rs
@@ -0,0 +1,10 @@
+// Use `build-pass` to ensure const-prop lint runs.
+// build-pass
+
+fn main() {
+ let x = 2u32;
+ let y = 3u32;
+ if y <= x {
+ dbg!(x - y);
+ }
+}