about summary refs log tree commit diff
path: root/tests/ui/numbers-arithmetic/location-sub-overflow.rs
diff options
context:
space:
mode:
authorbohan <bohan-zhang@foxmail.com>2023-11-24 00:54:06 +0800
committerbohan <bohan-zhang@foxmail.com>2023-11-24 00:54:06 +0800
commitfc87d6e23d23ee267269106b9566ad17e1dc4d3e (patch)
tree9702f2293468eb5f0b581daaa441974f7a0eadc7 /tests/ui/numbers-arithmetic/location-sub-overflow.rs
parent91f7f266ce973a08e6e700f9ce815f7b61d347e9 (diff)
downloadrust-fc87d6e23d23ee267269106b9566ad17e1dc4d3e.tar.gz
rust-fc87d6e23d23ee267269106b9566ad17e1dc4d3e.zip
add track_caller for arith ops
Diffstat (limited to 'tests/ui/numbers-arithmetic/location-sub-overflow.rs')
-rw-r--r--tests/ui/numbers-arithmetic/location-sub-overflow.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/ui/numbers-arithmetic/location-sub-overflow.rs b/tests/ui/numbers-arithmetic/location-sub-overflow.rs
new file mode 100644
index 00000000000..2d77cb8f55e
--- /dev/null
+++ b/tests/ui/numbers-arithmetic/location-sub-overflow.rs
@@ -0,0 +1,7 @@
+// run-fail
+// ignore-wasm32
+// error-pattern:location-sub-overflow.rs
+
+fn main() {
+    let _: u8 = 0 - &1;
+}