diff options
| author | bohan <bohan-zhang@foxmail.com> | 2023-11-24 00:54:06 +0800 |
|---|---|---|
| committer | bohan <bohan-zhang@foxmail.com> | 2023-11-24 00:54:06 +0800 |
| commit | fc87d6e23d23ee267269106b9566ad17e1dc4d3e (patch) | |
| tree | 9702f2293468eb5f0b581daaa441974f7a0eadc7 /tests/ui/numbers-arithmetic/location-sub-assign-overflow.rs | |
| parent | 91f7f266ce973a08e6e700f9ce815f7b61d347e9 (diff) | |
| download | rust-fc87d6e23d23ee267269106b9566ad17e1dc4d3e.tar.gz rust-fc87d6e23d23ee267269106b9566ad17e1dc4d3e.zip | |
add track_caller for arith ops
Diffstat (limited to 'tests/ui/numbers-arithmetic/location-sub-assign-overflow.rs')
| -rw-r--r-- | tests/ui/numbers-arithmetic/location-sub-assign-overflow.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/ui/numbers-arithmetic/location-sub-assign-overflow.rs b/tests/ui/numbers-arithmetic/location-sub-assign-overflow.rs new file mode 100644 index 00000000000..5b92ada2e0b --- /dev/null +++ b/tests/ui/numbers-arithmetic/location-sub-assign-overflow.rs @@ -0,0 +1,8 @@ +// run-fail +// ignore-wasm32 +// error-pattern:location-sub-assign-overflow.rs + +fn main() { + let mut a: u8 = 0; + a -= &1; +} |
