diff --git a/src/doc/rustc-dev-guide/src/tests/directives.md b/src/doc/rustc-dev-guide/src/tests/directives.md index 34d25b1d6dbc2..87d66489753c3 100644 --- a/src/doc/rustc-dev-guide/src/tests/directives.md +++ b/src/doc/rustc-dev-guide/src/tests/directives.md @@ -78,7 +78,7 @@ See [Controlling pass/fail expectations](ui.md#controlling-passfail-expectations | `run-fail` | Program must exit with code `1..=127` | `ui` | N/A | | `run-crash` | Program must crash | `ui` | N/A | | `run-fail-or-crash` | Program must `run-fail` or `run-crash` | `ui` | N/A | -| `ignore-pass` | Ignore `--pass` flag | `ui` | N/A | +| `no-pass-override` | Ignore `--pass` flag | `ui` | N/A | | `dont-check-failure-status` | Don't check exact failure status (i.e. `1`) | `ui`, `incremental` | N/A | | `failure-status` | On failure, the compiler must exit with this status code. To expect an ICE, use `//@ failure-status: 101`. | `ui`, `incremental` | Any `u16` | | `should-fail` | Compiletest self-test | All | N/A | diff --git a/src/doc/rustc-dev-guide/src/tests/running.md b/src/doc/rustc-dev-guide/src/tests/running.md index 74bcc01e28c14..0ee670277a6b5 100644 --- a/src/doc/rustc-dev-guide/src/tests/running.md +++ b/src/doc/rustc-dev-guide/src/tests/running.md @@ -202,7 +202,7 @@ There are a few options for running tests: Pass UI tests now have three modes, `check-pass`, `build-pass` and `run-pass`. When `--pass $mode` is passed, these tests will be forced to run under the given -`$mode` unless the directive `//@ ignore-pass` exists in the test file. +`$mode` unless the directive `//@ no-pass-override` exists in the test file. For example, you can run all the tests in `tests/ui` as `check-pass`: ```text diff --git a/src/doc/rustc-dev-guide/src/tests/ui.md b/src/doc/rustc-dev-guide/src/tests/ui.md index d90240af2591f..1e74a3de40403 100644 --- a/src/doc/rustc-dev-guide/src/tests/ui.md +++ b/src/doc/rustc-dev-guide/src/tests/ui.md @@ -492,7 +492,7 @@ Using `--pass check` can run the UI test suite much faster (roughly twice as fast on my system), though obviously not exercising as much. -The `ignore-pass` directive can be used to ignore the `--pass` CLI flag if the +The `no-pass-override` directive can be used to ignore the `--pass` CLI flag if the test won't work properly with that override. diff --git a/src/tools/compiletest/src/directives.rs b/src/tools/compiletest/src/directives.rs index 51a9e638fd7a4..b37d3d8e17aa8 100644 --- a/src/tools/compiletest/src/directives.rs +++ b/src/tools/compiletest/src/directives.rs @@ -171,7 +171,7 @@ pub(crate) struct TestProps { /// None for non-UI tests, and for auxiliary crates used by UI tests. pub(crate) pass_fail_mode: Option, // Ignore `--pass` overrides from the command line for this test. - pub(crate) ignore_pass: bool, + pub(crate) no_pass_override: bool, // rustdoc will test the output of the `--test` option pub(crate) check_test_line_numbers_match: bool, // customized normalization rules @@ -244,7 +244,6 @@ mod directives { pub(crate) const UNSET_RUSTC_ENV: &str = "unset-rustc-env"; pub(crate) const FORBID_OUTPUT: &str = "forbid-output"; pub(crate) const CHECK_TEST_LINE_NUMBERS_MATCH: &str = "check-test-line-numbers-match"; - pub(crate) const IGNORE_PASS: &str = "ignore-pass"; pub(crate) const FAILURE_STATUS: &str = "failure-status"; pub(crate) const DONT_CHECK_FAILURE_STATUS: &str = "dont-check-failure-status"; pub(crate) const RUN_RUSTFIX: &str = "run-rustfix"; @@ -298,7 +297,7 @@ impl TestProps { incremental: false, known_bug: false, pass_fail_mode: None, - ignore_pass: false, + no_pass_override: false, check_test_line_numbers_match: false, normalize_stdout: vec![], normalize_stderr: vec![], @@ -332,7 +331,7 @@ impl TestProps { // copy over select properties to the aux build: props.incremental_dir = self.incremental_dir.clone(); - props.ignore_pass = true; + props.no_pass_override = true; props.load_from(testfile, revision, config); props diff --git a/src/tools/compiletest/src/directives/cfg.rs b/src/tools/compiletest/src/directives/cfg.rs index 2587acb7fe106..25ebb86ad28d3 100644 --- a/src/tools/compiletest/src/directives/cfg.rs +++ b/src/tools/compiletest/src/directives/cfg.rs @@ -12,7 +12,6 @@ const EXTERNAL_IGNORES_LIST: &[&str] = &[ "ignore-gdb-version", "ignore-llvm-version", "ignore-parallel-frontend", - "ignore-pass", // tidy-alphabetical-end ]; diff --git a/src/tools/compiletest/src/directives/directive_names.rs b/src/tools/compiletest/src/directives/directive_names.rs index e1b6e70d90f04..adab1e2160480 100644 --- a/src/tools/compiletest/src/directives/directive_names.rs +++ b/src/tools/compiletest/src/directives/directive_names.rs @@ -102,7 +102,6 @@ pub(crate) const KNOWN_DIRECTIVE_NAMES: &[&str] = &[ "ignore-nvptx64-nvidia-cuda", "ignore-openbsd", "ignore-parallel-frontend", - "ignore-pass", "ignore-powerpc", "ignore-powerpc64", "ignore-remote", @@ -201,6 +200,7 @@ pub(crate) const KNOWN_DIRECTIVE_NAMES: &[&str] = &[ "needs-wasmtime", "needs-xray", "no-auto-check-cfg", + "no-pass-override", "no-prefer-dynamic", "normalize-stderr", "normalize-stderr-32bit", diff --git a/src/tools/compiletest/src/directives/handlers.rs b/src/tools/compiletest/src/directives/handlers.rs index fa36c86bde259..3848bb4854e75 100644 --- a/src/tools/compiletest/src/directives/handlers.rs +++ b/src/tools/compiletest/src/directives/handlers.rs @@ -199,8 +199,8 @@ fn make_directive_handlers_map() -> HashMap<&'static str, Handler> { multi_handler(PassFailMode::STR_VARIANTS, |config, ln, props| { props.update_pass_fail_mode(ln, config); }), - handler(IGNORE_PASS, |config, ln, props| { - config.set_name_directive(ln, IGNORE_PASS, &mut props.ignore_pass); + handler("no-pass-override", |config, ln, props| { + config.set_name_directive(ln, ln.name, &mut props.no_pass_override); }), multi_handler( &[ diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs index 514c060e414e4..a2bf6c0839df4 100644 --- a/src/tools/compiletest/src/runtest.rs +++ b/src/tools/compiletest/src/runtest.rs @@ -298,9 +298,9 @@ impl<'test> TestCx<'test> { let declared = self.props.pass_fail_mode?; // Specifying `--pass` only overrides `//@ pass-*` modes, and only if - // the test doesn't opt out with `//@ ignore-pass`. + // the test doesn't opt out with `//@ no-pass-override`. if let Some(force_pass_mode) = self.config.force_pass_mode - && !self.props.ignore_pass + && !self.props.no_pass_override && declared.is_pass() { match force_pass_mode { diff --git a/tests/ui/abi/vectorcall-abi-checks.rs b/tests/ui/abi/vectorcall-abi-checks.rs index 1925508f2e8af..ca10226c50a8b 100644 --- a/tests/ui/abi/vectorcall-abi-checks.rs +++ b/tests/ui/abi/vectorcall-abi-checks.rs @@ -1,7 +1,6 @@ //@ add-minicore //@ compile-flags: --crate-type=rlib --target=i586-unknown-linux-gnu -C target-feature=-sse,-sse2 //@ build-fail -//@ ignore-pass (test emits codegen-time errors) //@ needs-llvm-components: x86 //@ ignore-backends: gcc #![feature(no_core, abi_vectorcall)] diff --git a/tests/ui/abi/vectorcall-abi-checks.stderr b/tests/ui/abi/vectorcall-abi-checks.stderr index 12c257fc6707d..671ebc25b42a0 100644 --- a/tests/ui/abi/vectorcall-abi-checks.stderr +++ b/tests/ui/abi/vectorcall-abi-checks.stderr @@ -1,5 +1,5 @@ error: this function definition uses ABI "vectorcall" which requires the `sse2` target feature, which is not enabled - --> $DIR/vectorcall-abi-checks.rs:14:1 + --> $DIR/vectorcall-abi-checks.rs:13:1 | LL | pub extern "vectorcall" fn f() { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here @@ -7,7 +7,7 @@ LL | pub extern "vectorcall" fn f() { = help: consider enabling it globally (`-C target-feature=+sse2`) or locally (`#[target_feature(enable="sse2")]`) error: this function call uses ABI "vectorcall" which requires the `sse2` target feature, which is not enabled in the caller - --> $DIR/vectorcall-abi-checks.rs:20:5 + --> $DIR/vectorcall-abi-checks.rs:19:5 | LL | f(); | ^^^ function called here diff --git a/tests/ui/async-await/future-sizes/async-awaiting-fut.rs b/tests/ui/async-await/future-sizes/async-awaiting-fut.rs index 7113f591630d1..ab2a519d98cd5 100644 --- a/tests/ui/async-await/future-sizes/async-awaiting-fut.rs +++ b/tests/ui/async-await/future-sizes/async-awaiting-fut.rs @@ -4,7 +4,7 @@ //@ needs-deterministic-layouts //@ edition:2021 //@ build-pass -//@ ignore-pass +//@ no-pass-override (codegen affects -Zprint-type-sizes) //@ only-x86_64 async fn wait() {} diff --git a/tests/ui/async-await/future-sizes/large-arg.rs b/tests/ui/async-await/future-sizes/large-arg.rs index b05a2b7191512..3843e36c53e83 100644 --- a/tests/ui/async-await/future-sizes/large-arg.rs +++ b/tests/ui/async-await/future-sizes/large-arg.rs @@ -4,7 +4,7 @@ //@ needs-deterministic-layouts //@ edition: 2021 //@ build-pass -//@ ignore-pass +//@ no-pass-override (codegen affects -Zprint-type-sizes) //@ only-x86_64 pub async fn test() { diff --git a/tests/ui/codegen/empty-static-libs-issue-108825.rs b/tests/ui/codegen/empty-static-libs-issue-108825.rs index 4f8e4420f7245..8bdeeaa6d71d9 100644 --- a/tests/ui/codegen/empty-static-libs-issue-108825.rs +++ b/tests/ui/codegen/empty-static-libs-issue-108825.rs @@ -4,7 +4,7 @@ //@ compile-flags: -Cpanic=abort --print=native-static-libs //@ build-pass //@ dont-check-compiler-stderr (libcore links `/defaultlib:msvcrt` or `/defaultlib:libcmt` on MSVC) -//@ ignore-pass (the note is emitted later in the compilation pipeline, needs build) +//@ no-pass-override (the note is emitted later in the compilation pipeline, needs build) #![crate_type = "staticlib"] #![no_std] diff --git a/tests/ui/codegen/remark-flag-functionality.rs b/tests/ui/codegen/remark-flag-functionality.rs index 4cfc5f5c8ec19..432137ededbaf 100644 --- a/tests/ui/codegen/remark-flag-functionality.rs +++ b/tests/ui/codegen/remark-flag-functionality.rs @@ -3,7 +3,7 @@ //! Regression test for . //@ build-pass -//@ ignore-pass +//@ no-pass-override (LLVM remarks are produced during codegen) //@ revisions: all inline merge1 merge2 //@ compile-flags: --crate-type=lib -Cdebuginfo=1 -Copt-level=2 diff --git a/tests/ui/codegen/subtyping-enforces-type-equality.rs b/tests/ui/codegen/subtyping-enforces-type-equality.rs index 7d5228f517060..20e2de77993c2 100644 --- a/tests/ui/codegen/subtyping-enforces-type-equality.rs +++ b/tests/ui/codegen/subtyping-enforces-type-equality.rs @@ -1,4 +1,4 @@ -//@ ignore-pass +//@ no-pass-override (regression test for an ICE in codegen, #115215) //@ build-pass //@ edition:2021 use std::future::Future; diff --git a/tests/ui/consts/array-literal-index-oob.rs b/tests/ui/consts/array-literal-index-oob.rs index ca56206fbdf61..9a8db050f4876 100644 --- a/tests/ui/consts/array-literal-index-oob.rs +++ b/tests/ui/consts/array-literal-index-oob.rs @@ -1,5 +1,5 @@ //@ build-pass -//@ ignore-pass (test emits codegen-time warnings and verifies that they are not errors) +//@ no-pass-override (test emits codegen-time warnings and verifies that they are not errors) #![warn(unconditional_panic)] diff --git a/tests/ui/consts/overflowing-consts.noopt.stderr b/tests/ui/consts/overflowing-consts.noopt.stderr index 1ef2a60b64749..e7203cf8399ff 100644 --- a/tests/ui/consts/overflowing-consts.noopt.stderr +++ b/tests/ui/consts/overflowing-consts.noopt.stderr @@ -1,1019 +1,1019 @@ error[E0080]: attempt to shift left by `8_i32`, which would overflow - --> $DIR/overflowing-consts.rs:18:22 + --> $DIR/overflowing-consts.rs:17:22 | LL | const _NI8_SHL: i8 = 1i8 << 8; | ^^^^^^^^ evaluation of `_NI8_SHL` failed here error[E0080]: attempt to shift left by `8_i32`, which would overflow - --> $DIR/overflowing-consts.rs:19:26 + --> $DIR/overflowing-consts.rs:18:26 | LL | const _NI8_SHL_P: &i8 = &(1i8 << 8); | ^^^^^^^^^^ evaluation of `_NI8_SHL_P` failed here error[E0080]: attempt to shift left by `16_i32`, which would overflow - --> $DIR/overflowing-consts.rs:21:24 + --> $DIR/overflowing-consts.rs:20:24 | LL | const _NI16_SHL: i16 = 1i16 << 16; | ^^^^^^^^^^ evaluation of `_NI16_SHL` failed here error[E0080]: attempt to shift left by `16_i32`, which would overflow - --> $DIR/overflowing-consts.rs:22:28 + --> $DIR/overflowing-consts.rs:21:28 | LL | const _NI16_SHL_P: &i16 = &(1i16 << 16); | ^^^^^^^^^^^^ evaluation of `_NI16_SHL_P` failed here error[E0080]: attempt to shift left by `32_i32`, which would overflow - --> $DIR/overflowing-consts.rs:24:24 + --> $DIR/overflowing-consts.rs:23:24 | LL | const _NI32_SHL: i32 = 1i32 << 32; | ^^^^^^^^^^ evaluation of `_NI32_SHL` failed here error[E0080]: attempt to shift left by `32_i32`, which would overflow - --> $DIR/overflowing-consts.rs:25:28 + --> $DIR/overflowing-consts.rs:24:28 | LL | const _NI32_SHL_P: &i32 = &(1i32 << 32); | ^^^^^^^^^^^^ evaluation of `_NI32_SHL_P` failed here error[E0080]: attempt to shift left by `64_i32`, which would overflow - --> $DIR/overflowing-consts.rs:27:24 + --> $DIR/overflowing-consts.rs:26:24 | LL | const _NI64_SHL: i64 = 1i64 << 64; | ^^^^^^^^^^ evaluation of `_NI64_SHL` failed here error[E0080]: attempt to shift left by `64_i32`, which would overflow - --> $DIR/overflowing-consts.rs:28:28 + --> $DIR/overflowing-consts.rs:27:28 | LL | const _NI64_SHL_P: &i64 = &(1i64 << 64); | ^^^^^^^^^^^^ evaluation of `_NI64_SHL_P` failed here error[E0080]: attempt to shift left by `128_i32`, which would overflow - --> $DIR/overflowing-consts.rs:30:26 + --> $DIR/overflowing-consts.rs:29:26 | LL | const _NI128_SHL: i128 = 1i128 << 128; | ^^^^^^^^^^^^ evaluation of `_NI128_SHL` failed here error[E0080]: attempt to shift left by `128_i32`, which would overflow - --> $DIR/overflowing-consts.rs:31:30 + --> $DIR/overflowing-consts.rs:30:30 | LL | const _NI128_SHL_P: &i128 = &(1i128 << 128); | ^^^^^^^^^^^^^^ evaluation of `_NI128_SHL_P` failed here error[E0080]: attempt to shift left by `8_i32`, which would overflow - --> $DIR/overflowing-consts.rs:33:22 + --> $DIR/overflowing-consts.rs:32:22 | LL | const _NU8_SHL: u8 = 1u8 << 8; | ^^^^^^^^ evaluation of `_NU8_SHL` failed here error[E0080]: attempt to shift left by `8_i32`, which would overflow - --> $DIR/overflowing-consts.rs:34:26 + --> $DIR/overflowing-consts.rs:33:26 | LL | const _NU8_SHL_P: &u8 = &(1u8 << 8); | ^^^^^^^^^^ evaluation of `_NU8_SHL_P` failed here error[E0080]: attempt to shift left by `16_i32`, which would overflow - --> $DIR/overflowing-consts.rs:36:24 + --> $DIR/overflowing-consts.rs:35:24 | LL | const _NU16_SHL: u16 = 1u16 << 16; | ^^^^^^^^^^ evaluation of `_NU16_SHL` failed here error[E0080]: attempt to shift left by `16_i32`, which would overflow - --> $DIR/overflowing-consts.rs:37:28 + --> $DIR/overflowing-consts.rs:36:28 | LL | const _NU16_SHL_P: &u16 = &(1u16 << 16); | ^^^^^^^^^^^^ evaluation of `_NU16_SHL_P` failed here error[E0080]: attempt to shift left by `32_i32`, which would overflow - --> $DIR/overflowing-consts.rs:39:24 + --> $DIR/overflowing-consts.rs:38:24 | LL | const _NU32_SHL: u32 = 1u32 << 32; | ^^^^^^^^^^ evaluation of `_NU32_SHL` failed here error[E0080]: attempt to shift left by `32_i32`, which would overflow - --> $DIR/overflowing-consts.rs:40:28 + --> $DIR/overflowing-consts.rs:39:28 | LL | const _NU32_SHL_P: &u32 = &(1u32 << 32); | ^^^^^^^^^^^^ evaluation of `_NU32_SHL_P` failed here error[E0080]: attempt to shift left by `64_i32`, which would overflow - --> $DIR/overflowing-consts.rs:42:24 + --> $DIR/overflowing-consts.rs:41:24 | LL | const _NU64_SHL: u64 = 1u64 << 64; | ^^^^^^^^^^ evaluation of `_NU64_SHL` failed here error[E0080]: attempt to shift left by `64_i32`, which would overflow - --> $DIR/overflowing-consts.rs:43:28 + --> $DIR/overflowing-consts.rs:42:28 | LL | const _NU64_SHL_P: &u64 = &(1u64 << 64); | ^^^^^^^^^^^^ evaluation of `_NU64_SHL_P` failed here error[E0080]: attempt to shift left by `128_i32`, which would overflow - --> $DIR/overflowing-consts.rs:45:26 + --> $DIR/overflowing-consts.rs:44:26 | LL | const _NU128_SHL: u128 = 1u128 << 128; | ^^^^^^^^^^^^ evaluation of `_NU128_SHL` failed here error[E0080]: attempt to shift left by `128_i32`, which would overflow - --> $DIR/overflowing-consts.rs:46:30 + --> $DIR/overflowing-consts.rs:45:30 | LL | const _NU128_SHL_P: &u128 = &(1u128 << 128); | ^^^^^^^^^^^^^^ evaluation of `_NU128_SHL_P` failed here error[E0080]: attempt to shift left by `%BITS%`, which would overflow - --> $DIR/overflowing-consts.rs:48:28 + --> $DIR/overflowing-consts.rs:47:28 | LL | const _NISIZE_SHL: isize = 1isize << BITS; | ^^^^^^^^^^^^^^ evaluation of `_NISIZE_SHL` failed here error[E0080]: attempt to shift left by `%BITS%`, which would overflow - --> $DIR/overflowing-consts.rs:49:32 + --> $DIR/overflowing-consts.rs:48:32 | LL | const _NISIZE_SHL_P: &isize = &(1isize << BITS); | ^^^^^^^^^^^^^^^^ evaluation of `_NISIZE_SHL_P` failed here error[E0080]: attempt to shift left by `%BITS%`, which would overflow - --> $DIR/overflowing-consts.rs:51:28 + --> $DIR/overflowing-consts.rs:50:28 | LL | const _NUSIZE_SHL: usize = 1usize << BITS; | ^^^^^^^^^^^^^^ evaluation of `_NUSIZE_SHL` failed here error[E0080]: attempt to shift left by `%BITS%`, which would overflow - --> $DIR/overflowing-consts.rs:52:32 + --> $DIR/overflowing-consts.rs:51:32 | LL | const _NUSIZE_SHL_P: &usize = &(1usize << BITS); | ^^^^^^^^^^^^^^^^ evaluation of `_NUSIZE_SHL_P` failed here error[E0080]: attempt to shift right by `8_i32`, which would overflow - --> $DIR/overflowing-consts.rs:55:22 + --> $DIR/overflowing-consts.rs:54:22 | LL | const _NI8_SHR: i8 = 1i8 >> 8; | ^^^^^^^^ evaluation of `_NI8_SHR` failed here error[E0080]: attempt to shift right by `8_i32`, which would overflow - --> $DIR/overflowing-consts.rs:56:26 + --> $DIR/overflowing-consts.rs:55:26 | LL | const _NI8_SHR_P: &i8 = &(1i8 >> 8); | ^^^^^^^^^^ evaluation of `_NI8_SHR_P` failed here error[E0080]: attempt to shift right by `16_i32`, which would overflow - --> $DIR/overflowing-consts.rs:58:24 + --> $DIR/overflowing-consts.rs:57:24 | LL | const _NI16_SHR: i16 = 1i16 >> 16; | ^^^^^^^^^^ evaluation of `_NI16_SHR` failed here error[E0080]: attempt to shift right by `16_i32`, which would overflow - --> $DIR/overflowing-consts.rs:59:28 + --> $DIR/overflowing-consts.rs:58:28 | LL | const _NI16_SHR_P: &i16 = &(1i16 >> 16); | ^^^^^^^^^^^^ evaluation of `_NI16_SHR_P` failed here error[E0080]: attempt to shift right by `32_i32`, which would overflow - --> $DIR/overflowing-consts.rs:61:24 + --> $DIR/overflowing-consts.rs:60:24 | LL | const _NI32_SHR: i32 = 1i32 >> 32; | ^^^^^^^^^^ evaluation of `_NI32_SHR` failed here error[E0080]: attempt to shift right by `32_i32`, which would overflow - --> $DIR/overflowing-consts.rs:62:28 + --> $DIR/overflowing-consts.rs:61:28 | LL | const _NI32_SHR_P: &i32 = &(1i32 >> 32); | ^^^^^^^^^^^^ evaluation of `_NI32_SHR_P` failed here error[E0080]: attempt to shift right by `64_i32`, which would overflow - --> $DIR/overflowing-consts.rs:64:24 + --> $DIR/overflowing-consts.rs:63:24 | LL | const _NI64_SHR: i64 = 1i64 >> 64; | ^^^^^^^^^^ evaluation of `_NI64_SHR` failed here error[E0080]: attempt to shift right by `64_i32`, which would overflow - --> $DIR/overflowing-consts.rs:65:28 + --> $DIR/overflowing-consts.rs:64:28 | LL | const _NI64_SHR_P: &i64 = &(1i64 >> 64); | ^^^^^^^^^^^^ evaluation of `_NI64_SHR_P` failed here error[E0080]: attempt to shift right by `128_i32`, which would overflow - --> $DIR/overflowing-consts.rs:67:26 + --> $DIR/overflowing-consts.rs:66:26 | LL | const _NI128_SHR: i128 = 1i128 >> 128; | ^^^^^^^^^^^^ evaluation of `_NI128_SHR` failed here error[E0080]: attempt to shift right by `128_i32`, which would overflow - --> $DIR/overflowing-consts.rs:68:30 + --> $DIR/overflowing-consts.rs:67:30 | LL | const _NI128_SHR_P: &i128 = &(1i128 >> 128); | ^^^^^^^^^^^^^^ evaluation of `_NI128_SHR_P` failed here error[E0080]: attempt to shift right by `8_i32`, which would overflow - --> $DIR/overflowing-consts.rs:70:22 + --> $DIR/overflowing-consts.rs:69:22 | LL | const _NU8_SHR: u8 = 1u8 >> 8; | ^^^^^^^^ evaluation of `_NU8_SHR` failed here error[E0080]: attempt to shift right by `8_i32`, which would overflow - --> $DIR/overflowing-consts.rs:71:26 + --> $DIR/overflowing-consts.rs:70:26 | LL | const _NU8_SHR_P: &u8 = &(1u8 >> 8); | ^^^^^^^^^^ evaluation of `_NU8_SHR_P` failed here error[E0080]: attempt to shift right by `16_i32`, which would overflow - --> $DIR/overflowing-consts.rs:73:24 + --> $DIR/overflowing-consts.rs:72:24 | LL | const _NU16_SHR: u16 = 1u16 >> 16; | ^^^^^^^^^^ evaluation of `_NU16_SHR` failed here error[E0080]: attempt to shift right by `16_i32`, which would overflow - --> $DIR/overflowing-consts.rs:74:28 + --> $DIR/overflowing-consts.rs:73:28 | LL | const _NU16_SHR_P: &u16 = &(1u16 >> 16); | ^^^^^^^^^^^^ evaluation of `_NU16_SHR_P` failed here error[E0080]: attempt to shift right by `32_i32`, which would overflow - --> $DIR/overflowing-consts.rs:76:24 + --> $DIR/overflowing-consts.rs:75:24 | LL | const _NU32_SHR: u32 = 1u32 >> 32; | ^^^^^^^^^^ evaluation of `_NU32_SHR` failed here error[E0080]: attempt to shift right by `32_i32`, which would overflow - --> $DIR/overflowing-consts.rs:77:28 + --> $DIR/overflowing-consts.rs:76:28 | LL | const _NU32_SHR_P: &u32 = &(1u32 >> 32); | ^^^^^^^^^^^^ evaluation of `_NU32_SHR_P` failed here error[E0080]: attempt to shift right by `64_i32`, which would overflow - --> $DIR/overflowing-consts.rs:79:24 + --> $DIR/overflowing-consts.rs:78:24 | LL | const _NU64_SHR: u64 = 1u64 >> 64; | ^^^^^^^^^^ evaluation of `_NU64_SHR` failed here error[E0080]: attempt to shift right by `64_i32`, which would overflow - --> $DIR/overflowing-consts.rs:80:28 + --> $DIR/overflowing-consts.rs:79:28 | LL | const _NU64_SHR_P: &u64 = &(1u64 >> 64); | ^^^^^^^^^^^^ evaluation of `_NU64_SHR_P` failed here error[E0080]: attempt to shift right by `128_i32`, which would overflow - --> $DIR/overflowing-consts.rs:82:26 + --> $DIR/overflowing-consts.rs:81:26 | LL | const _NU128_SHR: u128 = 1u128 >> 128; | ^^^^^^^^^^^^ evaluation of `_NU128_SHR` failed here error[E0080]: attempt to shift right by `128_i32`, which would overflow - --> $DIR/overflowing-consts.rs:83:30 + --> $DIR/overflowing-consts.rs:82:30 | LL | const _NU128_SHR_P: &u128 = &(1u128 >> 128); | ^^^^^^^^^^^^^^ evaluation of `_NU128_SHR_P` failed here error[E0080]: attempt to shift right by `%BITS%`, which would overflow - --> $DIR/overflowing-consts.rs:85:28 + --> $DIR/overflowing-consts.rs:84:28 | LL | const _NISIZE_SHR: isize = 1isize >> BITS; | ^^^^^^^^^^^^^^ evaluation of `_NISIZE_SHR` failed here error[E0080]: attempt to shift right by `%BITS%`, which would overflow - --> $DIR/overflowing-consts.rs:86:32 + --> $DIR/overflowing-consts.rs:85:32 | LL | const _NISIZE_SHR_P: &isize = &(1isize >> BITS); | ^^^^^^^^^^^^^^^^ evaluation of `_NISIZE_SHR_P` failed here error[E0080]: attempt to shift right by `%BITS%`, which would overflow - --> $DIR/overflowing-consts.rs:88:28 + --> $DIR/overflowing-consts.rs:87:28 | LL | const _NUSIZE_SHR: usize = 1usize >> BITS; | ^^^^^^^^^^^^^^ evaluation of `_NUSIZE_SHR` failed here error[E0080]: attempt to shift right by `%BITS%`, which would overflow - --> $DIR/overflowing-consts.rs:89:32 + --> $DIR/overflowing-consts.rs:88:32 | LL | const _NUSIZE_SHR_P: &usize = &(1usize >> BITS); | ^^^^^^^^^^^^^^^^ evaluation of `_NUSIZE_SHR_P` failed here error[E0080]: attempt to compute `1_i8 + i8::MAX`, which would overflow - --> $DIR/overflowing-consts.rs:92:22 + --> $DIR/overflowing-consts.rs:91:22 | LL | const _NI8_ADD: i8 = 1i8 + i8::MAX; | ^^^^^^^^^^^^^ evaluation of `_NI8_ADD` failed here error[E0080]: attempt to compute `1_i8 + i8::MAX`, which would overflow - --> $DIR/overflowing-consts.rs:93:26 + --> $DIR/overflowing-consts.rs:92:26 | LL | const _NI8_ADD_P: &i8 = &(1i8 + i8::MAX); | ^^^^^^^^^^^^^^^ evaluation of `_NI8_ADD_P` failed here error[E0080]: attempt to compute `1_i16 + i16::MAX`, which would overflow - --> $DIR/overflowing-consts.rs:95:24 + --> $DIR/overflowing-consts.rs:94:24 | LL | const _NI16_ADD: i16 = 1i16 + i16::MAX; | ^^^^^^^^^^^^^^^ evaluation of `_NI16_ADD` failed here error[E0080]: attempt to compute `1_i16 + i16::MAX`, which would overflow - --> $DIR/overflowing-consts.rs:96:28 + --> $DIR/overflowing-consts.rs:95:28 | LL | const _NI16_ADD_P: &i16 = &(1i16 + i16::MAX); | ^^^^^^^^^^^^^^^^^ evaluation of `_NI16_ADD_P` failed here error[E0080]: attempt to compute `1_i32 + i32::MAX`, which would overflow - --> $DIR/overflowing-consts.rs:98:24 + --> $DIR/overflowing-consts.rs:97:24 | LL | const _NI32_ADD: i32 = 1i32 + i32::MAX; | ^^^^^^^^^^^^^^^ evaluation of `_NI32_ADD` failed here error[E0080]: attempt to compute `1_i32 + i32::MAX`, which would overflow - --> $DIR/overflowing-consts.rs:99:28 + --> $DIR/overflowing-consts.rs:98:28 | LL | const _NI32_ADD_P: &i32 = &(1i32 + i32::MAX); | ^^^^^^^^^^^^^^^^^ evaluation of `_NI32_ADD_P` failed here error[E0080]: attempt to compute `1_i64 + i64::MAX`, which would overflow - --> $DIR/overflowing-consts.rs:101:24 + --> $DIR/overflowing-consts.rs:100:24 | LL | const _NI64_ADD: i64 = 1i64 + i64::MAX; | ^^^^^^^^^^^^^^^ evaluation of `_NI64_ADD` failed here error[E0080]: attempt to compute `1_i64 + i64::MAX`, which would overflow - --> $DIR/overflowing-consts.rs:102:28 + --> $DIR/overflowing-consts.rs:101:28 | LL | const _NI64_ADD_P: &i64 = &(1i64 + i64::MAX); | ^^^^^^^^^^^^^^^^^ evaluation of `_NI64_ADD_P` failed here error[E0080]: attempt to compute `1_i128 + i128::MAX`, which would overflow - --> $DIR/overflowing-consts.rs:104:26 + --> $DIR/overflowing-consts.rs:103:26 | LL | const _NI128_ADD: i128 = 1i128 + i128::MAX; | ^^^^^^^^^^^^^^^^^ evaluation of `_NI128_ADD` failed here error[E0080]: attempt to compute `1_i128 + i128::MAX`, which would overflow - --> $DIR/overflowing-consts.rs:105:30 + --> $DIR/overflowing-consts.rs:104:30 | LL | const _NI128_ADD_P: &i128 = &(1i128 + i128::MAX); | ^^^^^^^^^^^^^^^^^^^ evaluation of `_NI128_ADD_P` failed here error[E0080]: attempt to compute `1_u8 + u8::MAX`, which would overflow - --> $DIR/overflowing-consts.rs:107:22 + --> $DIR/overflowing-consts.rs:106:22 | LL | const _NU8_ADD: u8 = 1u8 + u8::MAX; | ^^^^^^^^^^^^^ evaluation of `_NU8_ADD` failed here error[E0080]: attempt to compute `1_u8 + u8::MAX`, which would overflow - --> $DIR/overflowing-consts.rs:108:26 + --> $DIR/overflowing-consts.rs:107:26 | LL | const _NU8_ADD_P: &u8 = &(1u8 + u8::MAX); | ^^^^^^^^^^^^^^^ evaluation of `_NU8_ADD_P` failed here error[E0080]: attempt to compute `1_u16 + u16::MAX`, which would overflow - --> $DIR/overflowing-consts.rs:110:24 + --> $DIR/overflowing-consts.rs:109:24 | LL | const _NU16_ADD: u16 = 1u16 + u16::MAX; | ^^^^^^^^^^^^^^^ evaluation of `_NU16_ADD` failed here error[E0080]: attempt to compute `1_u16 + u16::MAX`, which would overflow - --> $DIR/overflowing-consts.rs:111:28 + --> $DIR/overflowing-consts.rs:110:28 | LL | const _NU16_ADD_P: &u16 = &(1u16 + u16::MAX); | ^^^^^^^^^^^^^^^^^ evaluation of `_NU16_ADD_P` failed here error[E0080]: attempt to compute `1_u32 + u32::MAX`, which would overflow - --> $DIR/overflowing-consts.rs:113:24 + --> $DIR/overflowing-consts.rs:112:24 | LL | const _NU32_ADD: u32 = 1u32 + u32::MAX; | ^^^^^^^^^^^^^^^ evaluation of `_NU32_ADD` failed here error[E0080]: attempt to compute `1_u32 + u32::MAX`, which would overflow - --> $DIR/overflowing-consts.rs:114:28 + --> $DIR/overflowing-consts.rs:113:28 | LL | const _NU32_ADD_P: &u32 = &(1u32 + u32::MAX); | ^^^^^^^^^^^^^^^^^ evaluation of `_NU32_ADD_P` failed here error[E0080]: attempt to compute `1_u64 + u64::MAX`, which would overflow - --> $DIR/overflowing-consts.rs:116:24 + --> $DIR/overflowing-consts.rs:115:24 | LL | const _NU64_ADD: u64 = 1u64 + u64::MAX; | ^^^^^^^^^^^^^^^ evaluation of `_NU64_ADD` failed here error[E0080]: attempt to compute `1_u64 + u64::MAX`, which would overflow - --> $DIR/overflowing-consts.rs:117:28 + --> $DIR/overflowing-consts.rs:116:28 | LL | const _NU64_ADD_P: &u64 = &(1u64 + u64::MAX); | ^^^^^^^^^^^^^^^^^ evaluation of `_NU64_ADD_P` failed here error[E0080]: attempt to compute `1_u128 + u128::MAX`, which would overflow - --> $DIR/overflowing-consts.rs:119:26 + --> $DIR/overflowing-consts.rs:118:26 | LL | const _NU128_ADD: u128 = 1u128 + u128::MAX; | ^^^^^^^^^^^^^^^^^ evaluation of `_NU128_ADD` failed here error[E0080]: attempt to compute `1_u128 + u128::MAX`, which would overflow - --> $DIR/overflowing-consts.rs:120:30 + --> $DIR/overflowing-consts.rs:119:30 | LL | const _NU128_ADD_P: &u128 = &(1u128 + u128::MAX); | ^^^^^^^^^^^^^^^^^^^ evaluation of `_NU128_ADD_P` failed here error[E0080]: attempt to compute `1_isize + isize::MAX`, which would overflow - --> $DIR/overflowing-consts.rs:122:28 + --> $DIR/overflowing-consts.rs:121:28 | LL | const _NISIZE_ADD: isize = 1isize + isize::MAX; | ^^^^^^^^^^^^^^^^^^^ evaluation of `_NISIZE_ADD` failed here error[E0080]: attempt to compute `1_isize + isize::MAX`, which would overflow - --> $DIR/overflowing-consts.rs:123:32 + --> $DIR/overflowing-consts.rs:122:32 | LL | const _NISIZE_ADD_P: &isize = &(1isize + isize::MAX); | ^^^^^^^^^^^^^^^^^^^^^ evaluation of `_NISIZE_ADD_P` failed here error[E0080]: attempt to compute `1_usize + usize::MAX`, which would overflow - --> $DIR/overflowing-consts.rs:125:28 + --> $DIR/overflowing-consts.rs:124:28 | LL | const _NUSIZE_ADD: usize = 1usize + usize::MAX; | ^^^^^^^^^^^^^^^^^^^ evaluation of `_NUSIZE_ADD` failed here error[E0080]: attempt to compute `1_usize + usize::MAX`, which would overflow - --> $DIR/overflowing-consts.rs:126:32 + --> $DIR/overflowing-consts.rs:125:32 | LL | const _NUSIZE_ADD_P: &usize = &(1usize + usize::MAX); | ^^^^^^^^^^^^^^^^^^^^^ evaluation of `_NUSIZE_ADD_P` failed here error[E0080]: attempt to compute `-5_i8 - i8::MAX`, which would overflow - --> $DIR/overflowing-consts.rs:129:22 + --> $DIR/overflowing-consts.rs:128:22 | LL | const _NI8_SUB: i8 = -5i8 - i8::MAX; | ^^^^^^^^^^^^^^ evaluation of `_NI8_SUB` failed here error[E0080]: attempt to compute `-5_i8 - i8::MAX`, which would overflow - --> $DIR/overflowing-consts.rs:130:26 + --> $DIR/overflowing-consts.rs:129:26 | LL | const _NI8_SUB_P: &i8 = &(-5i8 - i8::MAX); | ^^^^^^^^^^^^^^^^ evaluation of `_NI8_SUB_P` failed here error[E0080]: attempt to compute `-5_i16 - i16::MAX`, which would overflow - --> $DIR/overflowing-consts.rs:132:24 + --> $DIR/overflowing-consts.rs:131:24 | LL | const _NI16_SUB: i16 = -5i16 - i16::MAX; | ^^^^^^^^^^^^^^^^ evaluation of `_NI16_SUB` failed here error[E0080]: attempt to compute `-5_i16 - i16::MAX`, which would overflow - --> $DIR/overflowing-consts.rs:133:28 + --> $DIR/overflowing-consts.rs:132:28 | LL | const _NI16_SUB_P: &i16 = &(-5i16 - i16::MAX); | ^^^^^^^^^^^^^^^^^^ evaluation of `_NI16_SUB_P` failed here error[E0080]: attempt to compute `-5_i32 - i32::MAX`, which would overflow - --> $DIR/overflowing-consts.rs:135:24 + --> $DIR/overflowing-consts.rs:134:24 | LL | const _NI32_SUB: i32 = -5i32 - i32::MAX; | ^^^^^^^^^^^^^^^^ evaluation of `_NI32_SUB` failed here error[E0080]: attempt to compute `-5_i32 - i32::MAX`, which would overflow - --> $DIR/overflowing-consts.rs:136:28 + --> $DIR/overflowing-consts.rs:135:28 | LL | const _NI32_SUB_P: &i32 = &(-5i32 - i32::MAX); | ^^^^^^^^^^^^^^^^^^ evaluation of `_NI32_SUB_P` failed here error[E0080]: attempt to compute `-5_i64 - i64::MAX`, which would overflow - --> $DIR/overflowing-consts.rs:138:24 + --> $DIR/overflowing-consts.rs:137:24 | LL | const _NI64_SUB: i64 = -5i64 - i64::MAX; | ^^^^^^^^^^^^^^^^ evaluation of `_NI64_SUB` failed here error[E0080]: attempt to compute `-5_i64 - i64::MAX`, which would overflow - --> $DIR/overflowing-consts.rs:139:28 + --> $DIR/overflowing-consts.rs:138:28 | LL | const _NI64_SUB_P: &i64 = &(-5i64 - i64::MAX); | ^^^^^^^^^^^^^^^^^^ evaluation of `_NI64_SUB_P` failed here error[E0080]: attempt to compute `-5_i128 - i128::MAX`, which would overflow - --> $DIR/overflowing-consts.rs:141:26 + --> $DIR/overflowing-consts.rs:140:26 | LL | const _NI128_SUB: i128 = -5i128 - i128::MAX; | ^^^^^^^^^^^^^^^^^^ evaluation of `_NI128_SUB` failed here error[E0080]: attempt to compute `-5_i128 - i128::MAX`, which would overflow - --> $DIR/overflowing-consts.rs:142:30 + --> $DIR/overflowing-consts.rs:141:30 | LL | const _NI128_SUB_P: &i128 = &(-5i128 - i128::MAX); | ^^^^^^^^^^^^^^^^^^^^ evaluation of `_NI128_SUB_P` failed here error[E0080]: attempt to compute `1_u8 - 5_u8`, which would overflow - --> $DIR/overflowing-consts.rs:144:22 + --> $DIR/overflowing-consts.rs:143:22 | LL | const _NU8_SUB: u8 = 1u8 - 5; | ^^^^^^^ evaluation of `_NU8_SUB` failed here error[E0080]: attempt to compute `1_u8 - 5_u8`, which would overflow - --> $DIR/overflowing-consts.rs:145:26 + --> $DIR/overflowing-consts.rs:144:26 | LL | const _NU8_SUB_P: &u8 = &(1u8 - 5); | ^^^^^^^^^ evaluation of `_NU8_SUB_P` failed here error[E0080]: attempt to compute `1_u16 - 5_u16`, which would overflow - --> $DIR/overflowing-consts.rs:147:24 + --> $DIR/overflowing-consts.rs:146:24 | LL | const _NU16_SUB: u16 = 1u16 - 5; | ^^^^^^^^ evaluation of `_NU16_SUB` failed here error[E0080]: attempt to compute `1_u16 - 5_u16`, which would overflow - --> $DIR/overflowing-consts.rs:148:28 + --> $DIR/overflowing-consts.rs:147:28 | LL | const _NU16_SUB_P: &u16 = &(1u16 - 5); | ^^^^^^^^^^ evaluation of `_NU16_SUB_P` failed here error[E0080]: attempt to compute `1_u32 - 5_u32`, which would overflow - --> $DIR/overflowing-consts.rs:150:24 + --> $DIR/overflowing-consts.rs:149:24 | LL | const _NU32_SUB: u32 = 1u32 - 5; | ^^^^^^^^ evaluation of `_NU32_SUB` failed here error[E0080]: attempt to compute `1_u32 - 5_u32`, which would overflow - --> $DIR/overflowing-consts.rs:151:28 + --> $DIR/overflowing-consts.rs:150:28 | LL | const _NU32_SUB_P: &u32 = &(1u32 - 5); | ^^^^^^^^^^ evaluation of `_NU32_SUB_P` failed here error[E0080]: attempt to compute `1_u64 - 5_u64`, which would overflow - --> $DIR/overflowing-consts.rs:153:24 + --> $DIR/overflowing-consts.rs:152:24 | LL | const _NU64_SUB: u64 = 1u64 - 5; | ^^^^^^^^ evaluation of `_NU64_SUB` failed here error[E0080]: attempt to compute `1_u64 - 5_u64`, which would overflow - --> $DIR/overflowing-consts.rs:154:28 + --> $DIR/overflowing-consts.rs:153:28 | LL | const _NU64_SUB_P: &u64 = &(1u64 - 5); | ^^^^^^^^^^ evaluation of `_NU64_SUB_P` failed here error[E0080]: attempt to compute `1_u128 - 5_u128`, which would overflow - --> $DIR/overflowing-consts.rs:156:26 + --> $DIR/overflowing-consts.rs:155:26 | LL | const _NU128_SUB: u128 = 1u128 - 5; | ^^^^^^^^^ evaluation of `_NU128_SUB` failed here error[E0080]: attempt to compute `1_u128 - 5_u128`, which would overflow - --> $DIR/overflowing-consts.rs:157:30 + --> $DIR/overflowing-consts.rs:156:30 | LL | const _NU128_SUB_P: &u128 = &(1u128 - 5); | ^^^^^^^^^^^ evaluation of `_NU128_SUB_P` failed here error[E0080]: attempt to compute `-5_isize - isize::MAX`, which would overflow - --> $DIR/overflowing-consts.rs:159:28 + --> $DIR/overflowing-consts.rs:158:28 | LL | const _NISIZE_SUB: isize = -5isize - isize::MAX; | ^^^^^^^^^^^^^^^^^^^^ evaluation of `_NISIZE_SUB` failed here error[E0080]: attempt to compute `-5_isize - isize::MAX`, which would overflow - --> $DIR/overflowing-consts.rs:160:32 + --> $DIR/overflowing-consts.rs:159:32 | LL | const _NISIZE_SUB_P: &isize = &(-5isize - isize::MAX); | ^^^^^^^^^^^^^^^^^^^^^^ evaluation of `_NISIZE_SUB_P` failed here error[E0080]: attempt to compute `1_usize - 5_usize`, which would overflow - --> $DIR/overflowing-consts.rs:162:28 + --> $DIR/overflowing-consts.rs:161:28 | LL | const _NUSIZE_SUB: usize = 1usize - 5; | ^^^^^^^^^^ evaluation of `_NUSIZE_SUB` failed here error[E0080]: attempt to compute `1_usize - 5_usize`, which would overflow - --> $DIR/overflowing-consts.rs:163:32 + --> $DIR/overflowing-consts.rs:162:32 | LL | const _NUSIZE_SUB_P: &usize = &(1usize - 5); | ^^^^^^^^^^^^ evaluation of `_NUSIZE_SUB_P` failed here error[E0080]: attempt to compute `i8::MAX * 5_i8`, which would overflow - --> $DIR/overflowing-consts.rs:166:22 + --> $DIR/overflowing-consts.rs:165:22 | LL | const _NI8_MUL: i8 = i8::MAX * 5; | ^^^^^^^^^^^ evaluation of `_NI8_MUL` failed here error[E0080]: attempt to compute `i8::MAX * 5_i8`, which would overflow - --> $DIR/overflowing-consts.rs:167:26 + --> $DIR/overflowing-consts.rs:166:26 | LL | const _NI8_MUL_P: &i8 = &(i8::MAX * 5); | ^^^^^^^^^^^^^ evaluation of `_NI8_MUL_P` failed here error[E0080]: attempt to compute `i16::MAX * 5_i16`, which would overflow - --> $DIR/overflowing-consts.rs:169:24 + --> $DIR/overflowing-consts.rs:168:24 | LL | const _NI16_MUL: i16 = i16::MAX * 5; | ^^^^^^^^^^^^ evaluation of `_NI16_MUL` failed here error[E0080]: attempt to compute `i16::MAX * 5_i16`, which would overflow - --> $DIR/overflowing-consts.rs:170:28 + --> $DIR/overflowing-consts.rs:169:28 | LL | const _NI16_MUL_P: &i16 = &(i16::MAX * 5); | ^^^^^^^^^^^^^^ evaluation of `_NI16_MUL_P` failed here error[E0080]: attempt to compute `i32::MAX * 5_i32`, which would overflow - --> $DIR/overflowing-consts.rs:172:24 + --> $DIR/overflowing-consts.rs:171:24 | LL | const _NI32_MUL: i32 = i32::MAX * 5; | ^^^^^^^^^^^^ evaluation of `_NI32_MUL` failed here error[E0080]: attempt to compute `i32::MAX * 5_i32`, which would overflow - --> $DIR/overflowing-consts.rs:173:28 + --> $DIR/overflowing-consts.rs:172:28 | LL | const _NI32_MUL_P: &i32 = &(i32::MAX * 5); | ^^^^^^^^^^^^^^ evaluation of `_NI32_MUL_P` failed here error[E0080]: attempt to compute `i64::MAX * 5_i64`, which would overflow - --> $DIR/overflowing-consts.rs:175:24 + --> $DIR/overflowing-consts.rs:174:24 | LL | const _NI64_MUL: i64 = i64::MAX * 5; | ^^^^^^^^^^^^ evaluation of `_NI64_MUL` failed here error[E0080]: attempt to compute `i64::MAX * 5_i64`, which would overflow - --> $DIR/overflowing-consts.rs:176:28 + --> $DIR/overflowing-consts.rs:175:28 | LL | const _NI64_MUL_P: &i64 = &(i64::MAX * 5); | ^^^^^^^^^^^^^^ evaluation of `_NI64_MUL_P` failed here error[E0080]: attempt to compute `i128::MAX * 5_i128`, which would overflow - --> $DIR/overflowing-consts.rs:178:26 + --> $DIR/overflowing-consts.rs:177:26 | LL | const _NI128_MUL: i128 = i128::MAX * 5; | ^^^^^^^^^^^^^ evaluation of `_NI128_MUL` failed here error[E0080]: attempt to compute `i128::MAX * 5_i128`, which would overflow - --> $DIR/overflowing-consts.rs:179:30 + --> $DIR/overflowing-consts.rs:178:30 | LL | const _NI128_MUL_P: &i128 = &(i128::MAX * 5); | ^^^^^^^^^^^^^^^ evaluation of `_NI128_MUL_P` failed here error[E0080]: attempt to compute `u8::MAX * 5_u8`, which would overflow - --> $DIR/overflowing-consts.rs:181:22 + --> $DIR/overflowing-consts.rs:180:22 | LL | const _NU8_MUL: u8 = u8::MAX * 5; | ^^^^^^^^^^^ evaluation of `_NU8_MUL` failed here error[E0080]: attempt to compute `u8::MAX * 5_u8`, which would overflow - --> $DIR/overflowing-consts.rs:182:26 + --> $DIR/overflowing-consts.rs:181:26 | LL | const _NU8_MUL_P: &u8 = &(u8::MAX * 5); | ^^^^^^^^^^^^^ evaluation of `_NU8_MUL_P` failed here error[E0080]: attempt to compute `u16::MAX * 5_u16`, which would overflow - --> $DIR/overflowing-consts.rs:184:24 + --> $DIR/overflowing-consts.rs:183:24 | LL | const _NU16_MUL: u16 = u16::MAX * 5; | ^^^^^^^^^^^^ evaluation of `_NU16_MUL` failed here error[E0080]: attempt to compute `u16::MAX * 5_u16`, which would overflow - --> $DIR/overflowing-consts.rs:185:28 + --> $DIR/overflowing-consts.rs:184:28 | LL | const _NU16_MUL_P: &u16 = &(u16::MAX * 5); | ^^^^^^^^^^^^^^ evaluation of `_NU16_MUL_P` failed here error[E0080]: attempt to compute `u32::MAX * 5_u32`, which would overflow - --> $DIR/overflowing-consts.rs:187:24 + --> $DIR/overflowing-consts.rs:186:24 | LL | const _NU32_MUL: u32 = u32::MAX * 5; | ^^^^^^^^^^^^ evaluation of `_NU32_MUL` failed here error[E0080]: attempt to compute `u32::MAX * 5_u32`, which would overflow - --> $DIR/overflowing-consts.rs:188:28 + --> $DIR/overflowing-consts.rs:187:28 | LL | const _NU32_MUL_P: &u32 = &(u32::MAX * 5); | ^^^^^^^^^^^^^^ evaluation of `_NU32_MUL_P` failed here error[E0080]: attempt to compute `u64::MAX * 5_u64`, which would overflow - --> $DIR/overflowing-consts.rs:190:24 + --> $DIR/overflowing-consts.rs:189:24 | LL | const _NU64_MUL: u64 = u64::MAX * 5; | ^^^^^^^^^^^^ evaluation of `_NU64_MUL` failed here error[E0080]: attempt to compute `u64::MAX * 5_u64`, which would overflow - --> $DIR/overflowing-consts.rs:191:28 + --> $DIR/overflowing-consts.rs:190:28 | LL | const _NU64_MUL_P: &u64 = &(u64::MAX * 5); | ^^^^^^^^^^^^^^ evaluation of `_NU64_MUL_P` failed here error[E0080]: attempt to compute `u128::MAX * 5_u128`, which would overflow - --> $DIR/overflowing-consts.rs:193:26 + --> $DIR/overflowing-consts.rs:192:26 | LL | const _NU128_MUL: u128 = u128::MAX * 5; | ^^^^^^^^^^^^^ evaluation of `_NU128_MUL` failed here error[E0080]: attempt to compute `u128::MAX * 5_u128`, which would overflow - --> $DIR/overflowing-consts.rs:194:30 + --> $DIR/overflowing-consts.rs:193:30 | LL | const _NU128_MUL_P: &u128 = &(u128::MAX * 5); | ^^^^^^^^^^^^^^^ evaluation of `_NU128_MUL_P` failed here error[E0080]: attempt to compute `isize::MAX * 5_isize`, which would overflow - --> $DIR/overflowing-consts.rs:196:28 + --> $DIR/overflowing-consts.rs:195:28 | LL | const _NISIZE_MUL: isize = isize::MAX * 5; | ^^^^^^^^^^^^^^ evaluation of `_NISIZE_MUL` failed here error[E0080]: attempt to compute `isize::MAX * 5_isize`, which would overflow - --> $DIR/overflowing-consts.rs:197:32 + --> $DIR/overflowing-consts.rs:196:32 | LL | const _NISIZE_MUL_P: &isize = &(isize::MAX * 5); | ^^^^^^^^^^^^^^^^ evaluation of `_NISIZE_MUL_P` failed here error[E0080]: attempt to compute `usize::MAX * 5_usize`, which would overflow - --> $DIR/overflowing-consts.rs:199:28 + --> $DIR/overflowing-consts.rs:198:28 | LL | const _NUSIZE_MUL: usize = usize::MAX * 5; | ^^^^^^^^^^^^^^ evaluation of `_NUSIZE_MUL` failed here error[E0080]: attempt to compute `usize::MAX * 5_usize`, which would overflow - --> $DIR/overflowing-consts.rs:200:32 + --> $DIR/overflowing-consts.rs:199:32 | LL | const _NUSIZE_MUL_P: &usize = &(usize::MAX * 5); | ^^^^^^^^^^^^^^^^ evaluation of `_NUSIZE_MUL_P` failed here error[E0080]: attempt to divide `1_i8` by zero - --> $DIR/overflowing-consts.rs:203:22 + --> $DIR/overflowing-consts.rs:202:22 | LL | const _NI8_DIV: i8 = 1i8 / 0; | ^^^^^^^ evaluation of `_NI8_DIV` failed here error[E0080]: attempt to divide `1_i8` by zero - --> $DIR/overflowing-consts.rs:204:26 + --> $DIR/overflowing-consts.rs:203:26 | LL | const _NI8_DIV_P: &i8 = &(1i8 / 0); | ^^^^^^^^^ evaluation of `_NI8_DIV_P` failed here error[E0080]: attempt to divide `1_i16` by zero - --> $DIR/overflowing-consts.rs:206:24 + --> $DIR/overflowing-consts.rs:205:24 | LL | const _NI16_DIV: i16 = 1i16 / 0; | ^^^^^^^^ evaluation of `_NI16_DIV` failed here error[E0080]: attempt to divide `1_i16` by zero - --> $DIR/overflowing-consts.rs:207:28 + --> $DIR/overflowing-consts.rs:206:28 | LL | const _NI16_DIV_P: &i16 = &(1i16 / 0); | ^^^^^^^^^^ evaluation of `_NI16_DIV_P` failed here error[E0080]: attempt to divide `1_i32` by zero - --> $DIR/overflowing-consts.rs:209:24 + --> $DIR/overflowing-consts.rs:208:24 | LL | const _NI32_DIV: i32 = 1i32 / 0; | ^^^^^^^^ evaluation of `_NI32_DIV` failed here error[E0080]: attempt to divide `1_i32` by zero - --> $DIR/overflowing-consts.rs:210:28 + --> $DIR/overflowing-consts.rs:209:28 | LL | const _NI32_DIV_P: &i32 = &(1i32 / 0); | ^^^^^^^^^^ evaluation of `_NI32_DIV_P` failed here error[E0080]: attempt to divide `1_i64` by zero - --> $DIR/overflowing-consts.rs:212:24 + --> $DIR/overflowing-consts.rs:211:24 | LL | const _NI64_DIV: i64 = 1i64 / 0; | ^^^^^^^^ evaluation of `_NI64_DIV` failed here error[E0080]: attempt to divide `1_i64` by zero - --> $DIR/overflowing-consts.rs:213:28 + --> $DIR/overflowing-consts.rs:212:28 | LL | const _NI64_DIV_P: &i64 = &(1i64 / 0); | ^^^^^^^^^^ evaluation of `_NI64_DIV_P` failed here error[E0080]: attempt to divide `1_i128` by zero - --> $DIR/overflowing-consts.rs:215:26 + --> $DIR/overflowing-consts.rs:214:26 | LL | const _NI128_DIV: i128 = 1i128 / 0; | ^^^^^^^^^ evaluation of `_NI128_DIV` failed here error[E0080]: attempt to divide `1_i128` by zero - --> $DIR/overflowing-consts.rs:216:30 + --> $DIR/overflowing-consts.rs:215:30 | LL | const _NI128_DIV_P: &i128 = &(1i128 / 0); | ^^^^^^^^^^^ evaluation of `_NI128_DIV_P` failed here error[E0080]: attempt to divide `1_u8` by zero - --> $DIR/overflowing-consts.rs:218:22 + --> $DIR/overflowing-consts.rs:217:22 | LL | const _NU8_DIV: u8 = 1u8 / 0; | ^^^^^^^ evaluation of `_NU8_DIV` failed here error[E0080]: attempt to divide `1_u8` by zero - --> $DIR/overflowing-consts.rs:219:26 + --> $DIR/overflowing-consts.rs:218:26 | LL | const _NU8_DIV_P: &u8 = &(1u8 / 0); | ^^^^^^^^^ evaluation of `_NU8_DIV_P` failed here error[E0080]: attempt to divide `1_u16` by zero - --> $DIR/overflowing-consts.rs:221:24 + --> $DIR/overflowing-consts.rs:220:24 | LL | const _NU16_DIV: u16 = 1u16 / 0; | ^^^^^^^^ evaluation of `_NU16_DIV` failed here error[E0080]: attempt to divide `1_u16` by zero - --> $DIR/overflowing-consts.rs:222:28 + --> $DIR/overflowing-consts.rs:221:28 | LL | const _NU16_DIV_P: &u16 = &(1u16 / 0); | ^^^^^^^^^^ evaluation of `_NU16_DIV_P` failed here error[E0080]: attempt to divide `1_u32` by zero - --> $DIR/overflowing-consts.rs:224:24 + --> $DIR/overflowing-consts.rs:223:24 | LL | const _NU32_DIV: u32 = 1u32 / 0; | ^^^^^^^^ evaluation of `_NU32_DIV` failed here error[E0080]: attempt to divide `1_u32` by zero - --> $DIR/overflowing-consts.rs:225:28 + --> $DIR/overflowing-consts.rs:224:28 | LL | const _NU32_DIV_P: &u32 = &(1u32 / 0); | ^^^^^^^^^^ evaluation of `_NU32_DIV_P` failed here error[E0080]: attempt to divide `1_u64` by zero - --> $DIR/overflowing-consts.rs:227:24 + --> $DIR/overflowing-consts.rs:226:24 | LL | const _NU64_DIV: u64 = 1u64 / 0; | ^^^^^^^^ evaluation of `_NU64_DIV` failed here error[E0080]: attempt to divide `1_u64` by zero - --> $DIR/overflowing-consts.rs:228:28 + --> $DIR/overflowing-consts.rs:227:28 | LL | const _NU64_DIV_P: &u64 = &(1u64 / 0); | ^^^^^^^^^^ evaluation of `_NU64_DIV_P` failed here error[E0080]: attempt to divide `1_u128` by zero - --> $DIR/overflowing-consts.rs:230:26 + --> $DIR/overflowing-consts.rs:229:26 | LL | const _NU128_DIV: u128 = 1u128 / 0; | ^^^^^^^^^ evaluation of `_NU128_DIV` failed here error[E0080]: attempt to divide `1_u128` by zero - --> $DIR/overflowing-consts.rs:231:30 + --> $DIR/overflowing-consts.rs:230:30 | LL | const _NU128_DIV_P: &u128 = &(1u128 / 0); | ^^^^^^^^^^^ evaluation of `_NU128_DIV_P` failed here error[E0080]: attempt to divide `1_isize` by zero - --> $DIR/overflowing-consts.rs:233:28 + --> $DIR/overflowing-consts.rs:232:28 | LL | const _NISIZE_DIV: isize = 1isize / 0; | ^^^^^^^^^^ evaluation of `_NISIZE_DIV` failed here error[E0080]: attempt to divide `1_isize` by zero - --> $DIR/overflowing-consts.rs:234:32 + --> $DIR/overflowing-consts.rs:233:32 | LL | const _NISIZE_DIV_P: &isize = &(1isize / 0); | ^^^^^^^^^^^^ evaluation of `_NISIZE_DIV_P` failed here error[E0080]: attempt to divide `1_usize` by zero - --> $DIR/overflowing-consts.rs:236:28 + --> $DIR/overflowing-consts.rs:235:28 | LL | const _NUSIZE_DIV: usize = 1usize / 0; | ^^^^^^^^^^ evaluation of `_NUSIZE_DIV` failed here error[E0080]: attempt to divide `1_usize` by zero - --> $DIR/overflowing-consts.rs:237:32 + --> $DIR/overflowing-consts.rs:236:32 | LL | const _NUSIZE_DIV_P: &usize = &(1usize / 0); | ^^^^^^^^^^^^ evaluation of `_NUSIZE_DIV_P` failed here error[E0080]: attempt to calculate the remainder of `1_i8` with a divisor of zero - --> $DIR/overflowing-consts.rs:240:22 + --> $DIR/overflowing-consts.rs:239:22 | LL | const _NI8_MOD: i8 = 1i8 % 0; | ^^^^^^^ evaluation of `_NI8_MOD` failed here error[E0080]: attempt to calculate the remainder of `1_i8` with a divisor of zero - --> $DIR/overflowing-consts.rs:241:26 + --> $DIR/overflowing-consts.rs:240:26 | LL | const _NI8_MOD_P: &i8 = &(1i8 % 0); | ^^^^^^^^^ evaluation of `_NI8_MOD_P` failed here error[E0080]: attempt to calculate the remainder of `1_i16` with a divisor of zero - --> $DIR/overflowing-consts.rs:243:24 + --> $DIR/overflowing-consts.rs:242:24 | LL | const _NI16_MOD: i16 = 1i16 % 0; | ^^^^^^^^ evaluation of `_NI16_MOD` failed here error[E0080]: attempt to calculate the remainder of `1_i16` with a divisor of zero - --> $DIR/overflowing-consts.rs:244:28 + --> $DIR/overflowing-consts.rs:243:28 | LL | const _NI16_MOD_P: &i16 = &(1i16 % 0); | ^^^^^^^^^^ evaluation of `_NI16_MOD_P` failed here error[E0080]: attempt to calculate the remainder of `1_i32` with a divisor of zero - --> $DIR/overflowing-consts.rs:246:24 + --> $DIR/overflowing-consts.rs:245:24 | LL | const _NI32_MOD: i32 = 1i32 % 0; | ^^^^^^^^ evaluation of `_NI32_MOD` failed here error[E0080]: attempt to calculate the remainder of `1_i32` with a divisor of zero - --> $DIR/overflowing-consts.rs:247:28 + --> $DIR/overflowing-consts.rs:246:28 | LL | const _NI32_MOD_P: &i32 = &(1i32 % 0); | ^^^^^^^^^^ evaluation of `_NI32_MOD_P` failed here error[E0080]: attempt to calculate the remainder of `1_i64` with a divisor of zero - --> $DIR/overflowing-consts.rs:249:24 + --> $DIR/overflowing-consts.rs:248:24 | LL | const _NI64_MOD: i64 = 1i64 % 0; | ^^^^^^^^ evaluation of `_NI64_MOD` failed here error[E0080]: attempt to calculate the remainder of `1_i64` with a divisor of zero - --> $DIR/overflowing-consts.rs:250:28 + --> $DIR/overflowing-consts.rs:249:28 | LL | const _NI64_MOD_P: &i64 = &(1i64 % 0); | ^^^^^^^^^^ evaluation of `_NI64_MOD_P` failed here error[E0080]: attempt to calculate the remainder of `1_i128` with a divisor of zero - --> $DIR/overflowing-consts.rs:252:26 + --> $DIR/overflowing-consts.rs:251:26 | LL | const _NI128_MOD: i128 = 1i128 % 0; | ^^^^^^^^^ evaluation of `_NI128_MOD` failed here error[E0080]: attempt to calculate the remainder of `1_i128` with a divisor of zero - --> $DIR/overflowing-consts.rs:253:30 + --> $DIR/overflowing-consts.rs:252:30 | LL | const _NI128_MOD_P: &i128 = &(1i128 % 0); | ^^^^^^^^^^^ evaluation of `_NI128_MOD_P` failed here error[E0080]: attempt to calculate the remainder of `1_u8` with a divisor of zero - --> $DIR/overflowing-consts.rs:255:22 + --> $DIR/overflowing-consts.rs:254:22 | LL | const _NU8_MOD: u8 = 1u8 % 0; | ^^^^^^^ evaluation of `_NU8_MOD` failed here error[E0080]: attempt to calculate the remainder of `1_u8` with a divisor of zero - --> $DIR/overflowing-consts.rs:256:26 + --> $DIR/overflowing-consts.rs:255:26 | LL | const _NU8_MOD_P: &u8 = &(1u8 % 0); | ^^^^^^^^^ evaluation of `_NU8_MOD_P` failed here error[E0080]: attempt to calculate the remainder of `1_u16` with a divisor of zero - --> $DIR/overflowing-consts.rs:258:24 + --> $DIR/overflowing-consts.rs:257:24 | LL | const _NU16_MOD: u16 = 1u16 % 0; | ^^^^^^^^ evaluation of `_NU16_MOD` failed here error[E0080]: attempt to calculate the remainder of `1_u16` with a divisor of zero - --> $DIR/overflowing-consts.rs:259:28 + --> $DIR/overflowing-consts.rs:258:28 | LL | const _NU16_MOD_P: &u16 = &(1u16 % 0); | ^^^^^^^^^^ evaluation of `_NU16_MOD_P` failed here error[E0080]: attempt to calculate the remainder of `1_u32` with a divisor of zero - --> $DIR/overflowing-consts.rs:261:24 + --> $DIR/overflowing-consts.rs:260:24 | LL | const _NU32_MOD: u32 = 1u32 % 0; | ^^^^^^^^ evaluation of `_NU32_MOD` failed here error[E0080]: attempt to calculate the remainder of `1_u32` with a divisor of zero - --> $DIR/overflowing-consts.rs:262:28 + --> $DIR/overflowing-consts.rs:261:28 | LL | const _NU32_MOD_P: &u32 = &(1u32 % 0); | ^^^^^^^^^^ evaluation of `_NU32_MOD_P` failed here error[E0080]: attempt to calculate the remainder of `1_u64` with a divisor of zero - --> $DIR/overflowing-consts.rs:264:24 + --> $DIR/overflowing-consts.rs:263:24 | LL | const _NU64_MOD: u64 = 1u64 % 0; | ^^^^^^^^ evaluation of `_NU64_MOD` failed here error[E0080]: attempt to calculate the remainder of `1_u64` with a divisor of zero - --> $DIR/overflowing-consts.rs:265:28 + --> $DIR/overflowing-consts.rs:264:28 | LL | const _NU64_MOD_P: &u64 = &(1u64 % 0); | ^^^^^^^^^^ evaluation of `_NU64_MOD_P` failed here error[E0080]: attempt to calculate the remainder of `1_u128` with a divisor of zero - --> $DIR/overflowing-consts.rs:267:26 + --> $DIR/overflowing-consts.rs:266:26 | LL | const _NU128_MOD: u128 = 1u128 % 0; | ^^^^^^^^^ evaluation of `_NU128_MOD` failed here error[E0080]: attempt to calculate the remainder of `1_u128` with a divisor of zero - --> $DIR/overflowing-consts.rs:268:30 + --> $DIR/overflowing-consts.rs:267:30 | LL | const _NU128_MOD_P: &u128 = &(1u128 % 0); | ^^^^^^^^^^^ evaluation of `_NU128_MOD_P` failed here error[E0080]: attempt to calculate the remainder of `1_isize` with a divisor of zero - --> $DIR/overflowing-consts.rs:270:28 + --> $DIR/overflowing-consts.rs:269:28 | LL | const _NISIZE_MOD: isize = 1isize % 0; | ^^^^^^^^^^ evaluation of `_NISIZE_MOD` failed here error[E0080]: attempt to calculate the remainder of `1_isize` with a divisor of zero - --> $DIR/overflowing-consts.rs:271:32 + --> $DIR/overflowing-consts.rs:270:32 | LL | const _NISIZE_MOD_P: &isize = &(1isize % 0); | ^^^^^^^^^^^^ evaluation of `_NISIZE_MOD_P` failed here error[E0080]: attempt to calculate the remainder of `1_usize` with a divisor of zero - --> $DIR/overflowing-consts.rs:273:28 + --> $DIR/overflowing-consts.rs:272:28 | LL | const _NUSIZE_MOD: usize = 1usize % 0; | ^^^^^^^^^^ evaluation of `_NUSIZE_MOD` failed here error[E0080]: attempt to calculate the remainder of `1_usize` with a divisor of zero - --> $DIR/overflowing-consts.rs:274:32 + --> $DIR/overflowing-consts.rs:273:32 | LL | const _NUSIZE_MOD_P: &usize = &(1usize % 0); | ^^^^^^^^^^^^ evaluation of `_NUSIZE_MOD_P` failed here error[E0080]: index out of bounds: the length is 3 but the index is 4 - --> $DIR/overflowing-consts.rs:277:24 + --> $DIR/overflowing-consts.rs:276:24 | LL | const _NI32_OOB: i32 = [1, 2, 3][4]; | ^^^^^^^^^^^^ evaluation of `_NI32_OOB` failed here error[E0080]: index out of bounds: the length is 3 but the index is 4 - --> $DIR/overflowing-consts.rs:278:28 + --> $DIR/overflowing-consts.rs:277:28 | LL | const _NI32_OOB_P: &i32 = &([1, 2, 3][4]); | ^^^^^^^^^^^^^^ evaluation of `_NI32_OOB_P` failed here diff --git a/tests/ui/consts/overflowing-consts.opt.stderr b/tests/ui/consts/overflowing-consts.opt.stderr index 1ef2a60b64749..e7203cf8399ff 100644 --- a/tests/ui/consts/overflowing-consts.opt.stderr +++ b/tests/ui/consts/overflowing-consts.opt.stderr @@ -1,1019 +1,1019 @@ error[E0080]: attempt to shift left by `8_i32`, which would overflow - --> $DIR/overflowing-consts.rs:18:22 + --> $DIR/overflowing-consts.rs:17:22 | LL | const _NI8_SHL: i8 = 1i8 << 8; | ^^^^^^^^ evaluation of `_NI8_SHL` failed here error[E0080]: attempt to shift left by `8_i32`, which would overflow - --> $DIR/overflowing-consts.rs:19:26 + --> $DIR/overflowing-consts.rs:18:26 | LL | const _NI8_SHL_P: &i8 = &(1i8 << 8); | ^^^^^^^^^^ evaluation of `_NI8_SHL_P` failed here error[E0080]: attempt to shift left by `16_i32`, which would overflow - --> $DIR/overflowing-consts.rs:21:24 + --> $DIR/overflowing-consts.rs:20:24 | LL | const _NI16_SHL: i16 = 1i16 << 16; | ^^^^^^^^^^ evaluation of `_NI16_SHL` failed here error[E0080]: attempt to shift left by `16_i32`, which would overflow - --> $DIR/overflowing-consts.rs:22:28 + --> $DIR/overflowing-consts.rs:21:28 | LL | const _NI16_SHL_P: &i16 = &(1i16 << 16); | ^^^^^^^^^^^^ evaluation of `_NI16_SHL_P` failed here error[E0080]: attempt to shift left by `32_i32`, which would overflow - --> $DIR/overflowing-consts.rs:24:24 + --> $DIR/overflowing-consts.rs:23:24 | LL | const _NI32_SHL: i32 = 1i32 << 32; | ^^^^^^^^^^ evaluation of `_NI32_SHL` failed here error[E0080]: attempt to shift left by `32_i32`, which would overflow - --> $DIR/overflowing-consts.rs:25:28 + --> $DIR/overflowing-consts.rs:24:28 | LL | const _NI32_SHL_P: &i32 = &(1i32 << 32); | ^^^^^^^^^^^^ evaluation of `_NI32_SHL_P` failed here error[E0080]: attempt to shift left by `64_i32`, which would overflow - --> $DIR/overflowing-consts.rs:27:24 + --> $DIR/overflowing-consts.rs:26:24 | LL | const _NI64_SHL: i64 = 1i64 << 64; | ^^^^^^^^^^ evaluation of `_NI64_SHL` failed here error[E0080]: attempt to shift left by `64_i32`, which would overflow - --> $DIR/overflowing-consts.rs:28:28 + --> $DIR/overflowing-consts.rs:27:28 | LL | const _NI64_SHL_P: &i64 = &(1i64 << 64); | ^^^^^^^^^^^^ evaluation of `_NI64_SHL_P` failed here error[E0080]: attempt to shift left by `128_i32`, which would overflow - --> $DIR/overflowing-consts.rs:30:26 + --> $DIR/overflowing-consts.rs:29:26 | LL | const _NI128_SHL: i128 = 1i128 << 128; | ^^^^^^^^^^^^ evaluation of `_NI128_SHL` failed here error[E0080]: attempt to shift left by `128_i32`, which would overflow - --> $DIR/overflowing-consts.rs:31:30 + --> $DIR/overflowing-consts.rs:30:30 | LL | const _NI128_SHL_P: &i128 = &(1i128 << 128); | ^^^^^^^^^^^^^^ evaluation of `_NI128_SHL_P` failed here error[E0080]: attempt to shift left by `8_i32`, which would overflow - --> $DIR/overflowing-consts.rs:33:22 + --> $DIR/overflowing-consts.rs:32:22 | LL | const _NU8_SHL: u8 = 1u8 << 8; | ^^^^^^^^ evaluation of `_NU8_SHL` failed here error[E0080]: attempt to shift left by `8_i32`, which would overflow - --> $DIR/overflowing-consts.rs:34:26 + --> $DIR/overflowing-consts.rs:33:26 | LL | const _NU8_SHL_P: &u8 = &(1u8 << 8); | ^^^^^^^^^^ evaluation of `_NU8_SHL_P` failed here error[E0080]: attempt to shift left by `16_i32`, which would overflow - --> $DIR/overflowing-consts.rs:36:24 + --> $DIR/overflowing-consts.rs:35:24 | LL | const _NU16_SHL: u16 = 1u16 << 16; | ^^^^^^^^^^ evaluation of `_NU16_SHL` failed here error[E0080]: attempt to shift left by `16_i32`, which would overflow - --> $DIR/overflowing-consts.rs:37:28 + --> $DIR/overflowing-consts.rs:36:28 | LL | const _NU16_SHL_P: &u16 = &(1u16 << 16); | ^^^^^^^^^^^^ evaluation of `_NU16_SHL_P` failed here error[E0080]: attempt to shift left by `32_i32`, which would overflow - --> $DIR/overflowing-consts.rs:39:24 + --> $DIR/overflowing-consts.rs:38:24 | LL | const _NU32_SHL: u32 = 1u32 << 32; | ^^^^^^^^^^ evaluation of `_NU32_SHL` failed here error[E0080]: attempt to shift left by `32_i32`, which would overflow - --> $DIR/overflowing-consts.rs:40:28 + --> $DIR/overflowing-consts.rs:39:28 | LL | const _NU32_SHL_P: &u32 = &(1u32 << 32); | ^^^^^^^^^^^^ evaluation of `_NU32_SHL_P` failed here error[E0080]: attempt to shift left by `64_i32`, which would overflow - --> $DIR/overflowing-consts.rs:42:24 + --> $DIR/overflowing-consts.rs:41:24 | LL | const _NU64_SHL: u64 = 1u64 << 64; | ^^^^^^^^^^ evaluation of `_NU64_SHL` failed here error[E0080]: attempt to shift left by `64_i32`, which would overflow - --> $DIR/overflowing-consts.rs:43:28 + --> $DIR/overflowing-consts.rs:42:28 | LL | const _NU64_SHL_P: &u64 = &(1u64 << 64); | ^^^^^^^^^^^^ evaluation of `_NU64_SHL_P` failed here error[E0080]: attempt to shift left by `128_i32`, which would overflow - --> $DIR/overflowing-consts.rs:45:26 + --> $DIR/overflowing-consts.rs:44:26 | LL | const _NU128_SHL: u128 = 1u128 << 128; | ^^^^^^^^^^^^ evaluation of `_NU128_SHL` failed here error[E0080]: attempt to shift left by `128_i32`, which would overflow - --> $DIR/overflowing-consts.rs:46:30 + --> $DIR/overflowing-consts.rs:45:30 | LL | const _NU128_SHL_P: &u128 = &(1u128 << 128); | ^^^^^^^^^^^^^^ evaluation of `_NU128_SHL_P` failed here error[E0080]: attempt to shift left by `%BITS%`, which would overflow - --> $DIR/overflowing-consts.rs:48:28 + --> $DIR/overflowing-consts.rs:47:28 | LL | const _NISIZE_SHL: isize = 1isize << BITS; | ^^^^^^^^^^^^^^ evaluation of `_NISIZE_SHL` failed here error[E0080]: attempt to shift left by `%BITS%`, which would overflow - --> $DIR/overflowing-consts.rs:49:32 + --> $DIR/overflowing-consts.rs:48:32 | LL | const _NISIZE_SHL_P: &isize = &(1isize << BITS); | ^^^^^^^^^^^^^^^^ evaluation of `_NISIZE_SHL_P` failed here error[E0080]: attempt to shift left by `%BITS%`, which would overflow - --> $DIR/overflowing-consts.rs:51:28 + --> $DIR/overflowing-consts.rs:50:28 | LL | const _NUSIZE_SHL: usize = 1usize << BITS; | ^^^^^^^^^^^^^^ evaluation of `_NUSIZE_SHL` failed here error[E0080]: attempt to shift left by `%BITS%`, which would overflow - --> $DIR/overflowing-consts.rs:52:32 + --> $DIR/overflowing-consts.rs:51:32 | LL | const _NUSIZE_SHL_P: &usize = &(1usize << BITS); | ^^^^^^^^^^^^^^^^ evaluation of `_NUSIZE_SHL_P` failed here error[E0080]: attempt to shift right by `8_i32`, which would overflow - --> $DIR/overflowing-consts.rs:55:22 + --> $DIR/overflowing-consts.rs:54:22 | LL | const _NI8_SHR: i8 = 1i8 >> 8; | ^^^^^^^^ evaluation of `_NI8_SHR` failed here error[E0080]: attempt to shift right by `8_i32`, which would overflow - --> $DIR/overflowing-consts.rs:56:26 + --> $DIR/overflowing-consts.rs:55:26 | LL | const _NI8_SHR_P: &i8 = &(1i8 >> 8); | ^^^^^^^^^^ evaluation of `_NI8_SHR_P` failed here error[E0080]: attempt to shift right by `16_i32`, which would overflow - --> $DIR/overflowing-consts.rs:58:24 + --> $DIR/overflowing-consts.rs:57:24 | LL | const _NI16_SHR: i16 = 1i16 >> 16; | ^^^^^^^^^^ evaluation of `_NI16_SHR` failed here error[E0080]: attempt to shift right by `16_i32`, which would overflow - --> $DIR/overflowing-consts.rs:59:28 + --> $DIR/overflowing-consts.rs:58:28 | LL | const _NI16_SHR_P: &i16 = &(1i16 >> 16); | ^^^^^^^^^^^^ evaluation of `_NI16_SHR_P` failed here error[E0080]: attempt to shift right by `32_i32`, which would overflow - --> $DIR/overflowing-consts.rs:61:24 + --> $DIR/overflowing-consts.rs:60:24 | LL | const _NI32_SHR: i32 = 1i32 >> 32; | ^^^^^^^^^^ evaluation of `_NI32_SHR` failed here error[E0080]: attempt to shift right by `32_i32`, which would overflow - --> $DIR/overflowing-consts.rs:62:28 + --> $DIR/overflowing-consts.rs:61:28 | LL | const _NI32_SHR_P: &i32 = &(1i32 >> 32); | ^^^^^^^^^^^^ evaluation of `_NI32_SHR_P` failed here error[E0080]: attempt to shift right by `64_i32`, which would overflow - --> $DIR/overflowing-consts.rs:64:24 + --> $DIR/overflowing-consts.rs:63:24 | LL | const _NI64_SHR: i64 = 1i64 >> 64; | ^^^^^^^^^^ evaluation of `_NI64_SHR` failed here error[E0080]: attempt to shift right by `64_i32`, which would overflow - --> $DIR/overflowing-consts.rs:65:28 + --> $DIR/overflowing-consts.rs:64:28 | LL | const _NI64_SHR_P: &i64 = &(1i64 >> 64); | ^^^^^^^^^^^^ evaluation of `_NI64_SHR_P` failed here error[E0080]: attempt to shift right by `128_i32`, which would overflow - --> $DIR/overflowing-consts.rs:67:26 + --> $DIR/overflowing-consts.rs:66:26 | LL | const _NI128_SHR: i128 = 1i128 >> 128; | ^^^^^^^^^^^^ evaluation of `_NI128_SHR` failed here error[E0080]: attempt to shift right by `128_i32`, which would overflow - --> $DIR/overflowing-consts.rs:68:30 + --> $DIR/overflowing-consts.rs:67:30 | LL | const _NI128_SHR_P: &i128 = &(1i128 >> 128); | ^^^^^^^^^^^^^^ evaluation of `_NI128_SHR_P` failed here error[E0080]: attempt to shift right by `8_i32`, which would overflow - --> $DIR/overflowing-consts.rs:70:22 + --> $DIR/overflowing-consts.rs:69:22 | LL | const _NU8_SHR: u8 = 1u8 >> 8; | ^^^^^^^^ evaluation of `_NU8_SHR` failed here error[E0080]: attempt to shift right by `8_i32`, which would overflow - --> $DIR/overflowing-consts.rs:71:26 + --> $DIR/overflowing-consts.rs:70:26 | LL | const _NU8_SHR_P: &u8 = &(1u8 >> 8); | ^^^^^^^^^^ evaluation of `_NU8_SHR_P` failed here error[E0080]: attempt to shift right by `16_i32`, which would overflow - --> $DIR/overflowing-consts.rs:73:24 + --> $DIR/overflowing-consts.rs:72:24 | LL | const _NU16_SHR: u16 = 1u16 >> 16; | ^^^^^^^^^^ evaluation of `_NU16_SHR` failed here error[E0080]: attempt to shift right by `16_i32`, which would overflow - --> $DIR/overflowing-consts.rs:74:28 + --> $DIR/overflowing-consts.rs:73:28 | LL | const _NU16_SHR_P: &u16 = &(1u16 >> 16); | ^^^^^^^^^^^^ evaluation of `_NU16_SHR_P` failed here error[E0080]: attempt to shift right by `32_i32`, which would overflow - --> $DIR/overflowing-consts.rs:76:24 + --> $DIR/overflowing-consts.rs:75:24 | LL | const _NU32_SHR: u32 = 1u32 >> 32; | ^^^^^^^^^^ evaluation of `_NU32_SHR` failed here error[E0080]: attempt to shift right by `32_i32`, which would overflow - --> $DIR/overflowing-consts.rs:77:28 + --> $DIR/overflowing-consts.rs:76:28 | LL | const _NU32_SHR_P: &u32 = &(1u32 >> 32); | ^^^^^^^^^^^^ evaluation of `_NU32_SHR_P` failed here error[E0080]: attempt to shift right by `64_i32`, which would overflow - --> $DIR/overflowing-consts.rs:79:24 + --> $DIR/overflowing-consts.rs:78:24 | LL | const _NU64_SHR: u64 = 1u64 >> 64; | ^^^^^^^^^^ evaluation of `_NU64_SHR` failed here error[E0080]: attempt to shift right by `64_i32`, which would overflow - --> $DIR/overflowing-consts.rs:80:28 + --> $DIR/overflowing-consts.rs:79:28 | LL | const _NU64_SHR_P: &u64 = &(1u64 >> 64); | ^^^^^^^^^^^^ evaluation of `_NU64_SHR_P` failed here error[E0080]: attempt to shift right by `128_i32`, which would overflow - --> $DIR/overflowing-consts.rs:82:26 + --> $DIR/overflowing-consts.rs:81:26 | LL | const _NU128_SHR: u128 = 1u128 >> 128; | ^^^^^^^^^^^^ evaluation of `_NU128_SHR` failed here error[E0080]: attempt to shift right by `128_i32`, which would overflow - --> $DIR/overflowing-consts.rs:83:30 + --> $DIR/overflowing-consts.rs:82:30 | LL | const _NU128_SHR_P: &u128 = &(1u128 >> 128); | ^^^^^^^^^^^^^^ evaluation of `_NU128_SHR_P` failed here error[E0080]: attempt to shift right by `%BITS%`, which would overflow - --> $DIR/overflowing-consts.rs:85:28 + --> $DIR/overflowing-consts.rs:84:28 | LL | const _NISIZE_SHR: isize = 1isize >> BITS; | ^^^^^^^^^^^^^^ evaluation of `_NISIZE_SHR` failed here error[E0080]: attempt to shift right by `%BITS%`, which would overflow - --> $DIR/overflowing-consts.rs:86:32 + --> $DIR/overflowing-consts.rs:85:32 | LL | const _NISIZE_SHR_P: &isize = &(1isize >> BITS); | ^^^^^^^^^^^^^^^^ evaluation of `_NISIZE_SHR_P` failed here error[E0080]: attempt to shift right by `%BITS%`, which would overflow - --> $DIR/overflowing-consts.rs:88:28 + --> $DIR/overflowing-consts.rs:87:28 | LL | const _NUSIZE_SHR: usize = 1usize >> BITS; | ^^^^^^^^^^^^^^ evaluation of `_NUSIZE_SHR` failed here error[E0080]: attempt to shift right by `%BITS%`, which would overflow - --> $DIR/overflowing-consts.rs:89:32 + --> $DIR/overflowing-consts.rs:88:32 | LL | const _NUSIZE_SHR_P: &usize = &(1usize >> BITS); | ^^^^^^^^^^^^^^^^ evaluation of `_NUSIZE_SHR_P` failed here error[E0080]: attempt to compute `1_i8 + i8::MAX`, which would overflow - --> $DIR/overflowing-consts.rs:92:22 + --> $DIR/overflowing-consts.rs:91:22 | LL | const _NI8_ADD: i8 = 1i8 + i8::MAX; | ^^^^^^^^^^^^^ evaluation of `_NI8_ADD` failed here error[E0080]: attempt to compute `1_i8 + i8::MAX`, which would overflow - --> $DIR/overflowing-consts.rs:93:26 + --> $DIR/overflowing-consts.rs:92:26 | LL | const _NI8_ADD_P: &i8 = &(1i8 + i8::MAX); | ^^^^^^^^^^^^^^^ evaluation of `_NI8_ADD_P` failed here error[E0080]: attempt to compute `1_i16 + i16::MAX`, which would overflow - --> $DIR/overflowing-consts.rs:95:24 + --> $DIR/overflowing-consts.rs:94:24 | LL | const _NI16_ADD: i16 = 1i16 + i16::MAX; | ^^^^^^^^^^^^^^^ evaluation of `_NI16_ADD` failed here error[E0080]: attempt to compute `1_i16 + i16::MAX`, which would overflow - --> $DIR/overflowing-consts.rs:96:28 + --> $DIR/overflowing-consts.rs:95:28 | LL | const _NI16_ADD_P: &i16 = &(1i16 + i16::MAX); | ^^^^^^^^^^^^^^^^^ evaluation of `_NI16_ADD_P` failed here error[E0080]: attempt to compute `1_i32 + i32::MAX`, which would overflow - --> $DIR/overflowing-consts.rs:98:24 + --> $DIR/overflowing-consts.rs:97:24 | LL | const _NI32_ADD: i32 = 1i32 + i32::MAX; | ^^^^^^^^^^^^^^^ evaluation of `_NI32_ADD` failed here error[E0080]: attempt to compute `1_i32 + i32::MAX`, which would overflow - --> $DIR/overflowing-consts.rs:99:28 + --> $DIR/overflowing-consts.rs:98:28 | LL | const _NI32_ADD_P: &i32 = &(1i32 + i32::MAX); | ^^^^^^^^^^^^^^^^^ evaluation of `_NI32_ADD_P` failed here error[E0080]: attempt to compute `1_i64 + i64::MAX`, which would overflow - --> $DIR/overflowing-consts.rs:101:24 + --> $DIR/overflowing-consts.rs:100:24 | LL | const _NI64_ADD: i64 = 1i64 + i64::MAX; | ^^^^^^^^^^^^^^^ evaluation of `_NI64_ADD` failed here error[E0080]: attempt to compute `1_i64 + i64::MAX`, which would overflow - --> $DIR/overflowing-consts.rs:102:28 + --> $DIR/overflowing-consts.rs:101:28 | LL | const _NI64_ADD_P: &i64 = &(1i64 + i64::MAX); | ^^^^^^^^^^^^^^^^^ evaluation of `_NI64_ADD_P` failed here error[E0080]: attempt to compute `1_i128 + i128::MAX`, which would overflow - --> $DIR/overflowing-consts.rs:104:26 + --> $DIR/overflowing-consts.rs:103:26 | LL | const _NI128_ADD: i128 = 1i128 + i128::MAX; | ^^^^^^^^^^^^^^^^^ evaluation of `_NI128_ADD` failed here error[E0080]: attempt to compute `1_i128 + i128::MAX`, which would overflow - --> $DIR/overflowing-consts.rs:105:30 + --> $DIR/overflowing-consts.rs:104:30 | LL | const _NI128_ADD_P: &i128 = &(1i128 + i128::MAX); | ^^^^^^^^^^^^^^^^^^^ evaluation of `_NI128_ADD_P` failed here error[E0080]: attempt to compute `1_u8 + u8::MAX`, which would overflow - --> $DIR/overflowing-consts.rs:107:22 + --> $DIR/overflowing-consts.rs:106:22 | LL | const _NU8_ADD: u8 = 1u8 + u8::MAX; | ^^^^^^^^^^^^^ evaluation of `_NU8_ADD` failed here error[E0080]: attempt to compute `1_u8 + u8::MAX`, which would overflow - --> $DIR/overflowing-consts.rs:108:26 + --> $DIR/overflowing-consts.rs:107:26 | LL | const _NU8_ADD_P: &u8 = &(1u8 + u8::MAX); | ^^^^^^^^^^^^^^^ evaluation of `_NU8_ADD_P` failed here error[E0080]: attempt to compute `1_u16 + u16::MAX`, which would overflow - --> $DIR/overflowing-consts.rs:110:24 + --> $DIR/overflowing-consts.rs:109:24 | LL | const _NU16_ADD: u16 = 1u16 + u16::MAX; | ^^^^^^^^^^^^^^^ evaluation of `_NU16_ADD` failed here error[E0080]: attempt to compute `1_u16 + u16::MAX`, which would overflow - --> $DIR/overflowing-consts.rs:111:28 + --> $DIR/overflowing-consts.rs:110:28 | LL | const _NU16_ADD_P: &u16 = &(1u16 + u16::MAX); | ^^^^^^^^^^^^^^^^^ evaluation of `_NU16_ADD_P` failed here error[E0080]: attempt to compute `1_u32 + u32::MAX`, which would overflow - --> $DIR/overflowing-consts.rs:113:24 + --> $DIR/overflowing-consts.rs:112:24 | LL | const _NU32_ADD: u32 = 1u32 + u32::MAX; | ^^^^^^^^^^^^^^^ evaluation of `_NU32_ADD` failed here error[E0080]: attempt to compute `1_u32 + u32::MAX`, which would overflow - --> $DIR/overflowing-consts.rs:114:28 + --> $DIR/overflowing-consts.rs:113:28 | LL | const _NU32_ADD_P: &u32 = &(1u32 + u32::MAX); | ^^^^^^^^^^^^^^^^^ evaluation of `_NU32_ADD_P` failed here error[E0080]: attempt to compute `1_u64 + u64::MAX`, which would overflow - --> $DIR/overflowing-consts.rs:116:24 + --> $DIR/overflowing-consts.rs:115:24 | LL | const _NU64_ADD: u64 = 1u64 + u64::MAX; | ^^^^^^^^^^^^^^^ evaluation of `_NU64_ADD` failed here error[E0080]: attempt to compute `1_u64 + u64::MAX`, which would overflow - --> $DIR/overflowing-consts.rs:117:28 + --> $DIR/overflowing-consts.rs:116:28 | LL | const _NU64_ADD_P: &u64 = &(1u64 + u64::MAX); | ^^^^^^^^^^^^^^^^^ evaluation of `_NU64_ADD_P` failed here error[E0080]: attempt to compute `1_u128 + u128::MAX`, which would overflow - --> $DIR/overflowing-consts.rs:119:26 + --> $DIR/overflowing-consts.rs:118:26 | LL | const _NU128_ADD: u128 = 1u128 + u128::MAX; | ^^^^^^^^^^^^^^^^^ evaluation of `_NU128_ADD` failed here error[E0080]: attempt to compute `1_u128 + u128::MAX`, which would overflow - --> $DIR/overflowing-consts.rs:120:30 + --> $DIR/overflowing-consts.rs:119:30 | LL | const _NU128_ADD_P: &u128 = &(1u128 + u128::MAX); | ^^^^^^^^^^^^^^^^^^^ evaluation of `_NU128_ADD_P` failed here error[E0080]: attempt to compute `1_isize + isize::MAX`, which would overflow - --> $DIR/overflowing-consts.rs:122:28 + --> $DIR/overflowing-consts.rs:121:28 | LL | const _NISIZE_ADD: isize = 1isize + isize::MAX; | ^^^^^^^^^^^^^^^^^^^ evaluation of `_NISIZE_ADD` failed here error[E0080]: attempt to compute `1_isize + isize::MAX`, which would overflow - --> $DIR/overflowing-consts.rs:123:32 + --> $DIR/overflowing-consts.rs:122:32 | LL | const _NISIZE_ADD_P: &isize = &(1isize + isize::MAX); | ^^^^^^^^^^^^^^^^^^^^^ evaluation of `_NISIZE_ADD_P` failed here error[E0080]: attempt to compute `1_usize + usize::MAX`, which would overflow - --> $DIR/overflowing-consts.rs:125:28 + --> $DIR/overflowing-consts.rs:124:28 | LL | const _NUSIZE_ADD: usize = 1usize + usize::MAX; | ^^^^^^^^^^^^^^^^^^^ evaluation of `_NUSIZE_ADD` failed here error[E0080]: attempt to compute `1_usize + usize::MAX`, which would overflow - --> $DIR/overflowing-consts.rs:126:32 + --> $DIR/overflowing-consts.rs:125:32 | LL | const _NUSIZE_ADD_P: &usize = &(1usize + usize::MAX); | ^^^^^^^^^^^^^^^^^^^^^ evaluation of `_NUSIZE_ADD_P` failed here error[E0080]: attempt to compute `-5_i8 - i8::MAX`, which would overflow - --> $DIR/overflowing-consts.rs:129:22 + --> $DIR/overflowing-consts.rs:128:22 | LL | const _NI8_SUB: i8 = -5i8 - i8::MAX; | ^^^^^^^^^^^^^^ evaluation of `_NI8_SUB` failed here error[E0080]: attempt to compute `-5_i8 - i8::MAX`, which would overflow - --> $DIR/overflowing-consts.rs:130:26 + --> $DIR/overflowing-consts.rs:129:26 | LL | const _NI8_SUB_P: &i8 = &(-5i8 - i8::MAX); | ^^^^^^^^^^^^^^^^ evaluation of `_NI8_SUB_P` failed here error[E0080]: attempt to compute `-5_i16 - i16::MAX`, which would overflow - --> $DIR/overflowing-consts.rs:132:24 + --> $DIR/overflowing-consts.rs:131:24 | LL | const _NI16_SUB: i16 = -5i16 - i16::MAX; | ^^^^^^^^^^^^^^^^ evaluation of `_NI16_SUB` failed here error[E0080]: attempt to compute `-5_i16 - i16::MAX`, which would overflow - --> $DIR/overflowing-consts.rs:133:28 + --> $DIR/overflowing-consts.rs:132:28 | LL | const _NI16_SUB_P: &i16 = &(-5i16 - i16::MAX); | ^^^^^^^^^^^^^^^^^^ evaluation of `_NI16_SUB_P` failed here error[E0080]: attempt to compute `-5_i32 - i32::MAX`, which would overflow - --> $DIR/overflowing-consts.rs:135:24 + --> $DIR/overflowing-consts.rs:134:24 | LL | const _NI32_SUB: i32 = -5i32 - i32::MAX; | ^^^^^^^^^^^^^^^^ evaluation of `_NI32_SUB` failed here error[E0080]: attempt to compute `-5_i32 - i32::MAX`, which would overflow - --> $DIR/overflowing-consts.rs:136:28 + --> $DIR/overflowing-consts.rs:135:28 | LL | const _NI32_SUB_P: &i32 = &(-5i32 - i32::MAX); | ^^^^^^^^^^^^^^^^^^ evaluation of `_NI32_SUB_P` failed here error[E0080]: attempt to compute `-5_i64 - i64::MAX`, which would overflow - --> $DIR/overflowing-consts.rs:138:24 + --> $DIR/overflowing-consts.rs:137:24 | LL | const _NI64_SUB: i64 = -5i64 - i64::MAX; | ^^^^^^^^^^^^^^^^ evaluation of `_NI64_SUB` failed here error[E0080]: attempt to compute `-5_i64 - i64::MAX`, which would overflow - --> $DIR/overflowing-consts.rs:139:28 + --> $DIR/overflowing-consts.rs:138:28 | LL | const _NI64_SUB_P: &i64 = &(-5i64 - i64::MAX); | ^^^^^^^^^^^^^^^^^^ evaluation of `_NI64_SUB_P` failed here error[E0080]: attempt to compute `-5_i128 - i128::MAX`, which would overflow - --> $DIR/overflowing-consts.rs:141:26 + --> $DIR/overflowing-consts.rs:140:26 | LL | const _NI128_SUB: i128 = -5i128 - i128::MAX; | ^^^^^^^^^^^^^^^^^^ evaluation of `_NI128_SUB` failed here error[E0080]: attempt to compute `-5_i128 - i128::MAX`, which would overflow - --> $DIR/overflowing-consts.rs:142:30 + --> $DIR/overflowing-consts.rs:141:30 | LL | const _NI128_SUB_P: &i128 = &(-5i128 - i128::MAX); | ^^^^^^^^^^^^^^^^^^^^ evaluation of `_NI128_SUB_P` failed here error[E0080]: attempt to compute `1_u8 - 5_u8`, which would overflow - --> $DIR/overflowing-consts.rs:144:22 + --> $DIR/overflowing-consts.rs:143:22 | LL | const _NU8_SUB: u8 = 1u8 - 5; | ^^^^^^^ evaluation of `_NU8_SUB` failed here error[E0080]: attempt to compute `1_u8 - 5_u8`, which would overflow - --> $DIR/overflowing-consts.rs:145:26 + --> $DIR/overflowing-consts.rs:144:26 | LL | const _NU8_SUB_P: &u8 = &(1u8 - 5); | ^^^^^^^^^ evaluation of `_NU8_SUB_P` failed here error[E0080]: attempt to compute `1_u16 - 5_u16`, which would overflow - --> $DIR/overflowing-consts.rs:147:24 + --> $DIR/overflowing-consts.rs:146:24 | LL | const _NU16_SUB: u16 = 1u16 - 5; | ^^^^^^^^ evaluation of `_NU16_SUB` failed here error[E0080]: attempt to compute `1_u16 - 5_u16`, which would overflow - --> $DIR/overflowing-consts.rs:148:28 + --> $DIR/overflowing-consts.rs:147:28 | LL | const _NU16_SUB_P: &u16 = &(1u16 - 5); | ^^^^^^^^^^ evaluation of `_NU16_SUB_P` failed here error[E0080]: attempt to compute `1_u32 - 5_u32`, which would overflow - --> $DIR/overflowing-consts.rs:150:24 + --> $DIR/overflowing-consts.rs:149:24 | LL | const _NU32_SUB: u32 = 1u32 - 5; | ^^^^^^^^ evaluation of `_NU32_SUB` failed here error[E0080]: attempt to compute `1_u32 - 5_u32`, which would overflow - --> $DIR/overflowing-consts.rs:151:28 + --> $DIR/overflowing-consts.rs:150:28 | LL | const _NU32_SUB_P: &u32 = &(1u32 - 5); | ^^^^^^^^^^ evaluation of `_NU32_SUB_P` failed here error[E0080]: attempt to compute `1_u64 - 5_u64`, which would overflow - --> $DIR/overflowing-consts.rs:153:24 + --> $DIR/overflowing-consts.rs:152:24 | LL | const _NU64_SUB: u64 = 1u64 - 5; | ^^^^^^^^ evaluation of `_NU64_SUB` failed here error[E0080]: attempt to compute `1_u64 - 5_u64`, which would overflow - --> $DIR/overflowing-consts.rs:154:28 + --> $DIR/overflowing-consts.rs:153:28 | LL | const _NU64_SUB_P: &u64 = &(1u64 - 5); | ^^^^^^^^^^ evaluation of `_NU64_SUB_P` failed here error[E0080]: attempt to compute `1_u128 - 5_u128`, which would overflow - --> $DIR/overflowing-consts.rs:156:26 + --> $DIR/overflowing-consts.rs:155:26 | LL | const _NU128_SUB: u128 = 1u128 - 5; | ^^^^^^^^^ evaluation of `_NU128_SUB` failed here error[E0080]: attempt to compute `1_u128 - 5_u128`, which would overflow - --> $DIR/overflowing-consts.rs:157:30 + --> $DIR/overflowing-consts.rs:156:30 | LL | const _NU128_SUB_P: &u128 = &(1u128 - 5); | ^^^^^^^^^^^ evaluation of `_NU128_SUB_P` failed here error[E0080]: attempt to compute `-5_isize - isize::MAX`, which would overflow - --> $DIR/overflowing-consts.rs:159:28 + --> $DIR/overflowing-consts.rs:158:28 | LL | const _NISIZE_SUB: isize = -5isize - isize::MAX; | ^^^^^^^^^^^^^^^^^^^^ evaluation of `_NISIZE_SUB` failed here error[E0080]: attempt to compute `-5_isize - isize::MAX`, which would overflow - --> $DIR/overflowing-consts.rs:160:32 + --> $DIR/overflowing-consts.rs:159:32 | LL | const _NISIZE_SUB_P: &isize = &(-5isize - isize::MAX); | ^^^^^^^^^^^^^^^^^^^^^^ evaluation of `_NISIZE_SUB_P` failed here error[E0080]: attempt to compute `1_usize - 5_usize`, which would overflow - --> $DIR/overflowing-consts.rs:162:28 + --> $DIR/overflowing-consts.rs:161:28 | LL | const _NUSIZE_SUB: usize = 1usize - 5; | ^^^^^^^^^^ evaluation of `_NUSIZE_SUB` failed here error[E0080]: attempt to compute `1_usize - 5_usize`, which would overflow - --> $DIR/overflowing-consts.rs:163:32 + --> $DIR/overflowing-consts.rs:162:32 | LL | const _NUSIZE_SUB_P: &usize = &(1usize - 5); | ^^^^^^^^^^^^ evaluation of `_NUSIZE_SUB_P` failed here error[E0080]: attempt to compute `i8::MAX * 5_i8`, which would overflow - --> $DIR/overflowing-consts.rs:166:22 + --> $DIR/overflowing-consts.rs:165:22 | LL | const _NI8_MUL: i8 = i8::MAX * 5; | ^^^^^^^^^^^ evaluation of `_NI8_MUL` failed here error[E0080]: attempt to compute `i8::MAX * 5_i8`, which would overflow - --> $DIR/overflowing-consts.rs:167:26 + --> $DIR/overflowing-consts.rs:166:26 | LL | const _NI8_MUL_P: &i8 = &(i8::MAX * 5); | ^^^^^^^^^^^^^ evaluation of `_NI8_MUL_P` failed here error[E0080]: attempt to compute `i16::MAX * 5_i16`, which would overflow - --> $DIR/overflowing-consts.rs:169:24 + --> $DIR/overflowing-consts.rs:168:24 | LL | const _NI16_MUL: i16 = i16::MAX * 5; | ^^^^^^^^^^^^ evaluation of `_NI16_MUL` failed here error[E0080]: attempt to compute `i16::MAX * 5_i16`, which would overflow - --> $DIR/overflowing-consts.rs:170:28 + --> $DIR/overflowing-consts.rs:169:28 | LL | const _NI16_MUL_P: &i16 = &(i16::MAX * 5); | ^^^^^^^^^^^^^^ evaluation of `_NI16_MUL_P` failed here error[E0080]: attempt to compute `i32::MAX * 5_i32`, which would overflow - --> $DIR/overflowing-consts.rs:172:24 + --> $DIR/overflowing-consts.rs:171:24 | LL | const _NI32_MUL: i32 = i32::MAX * 5; | ^^^^^^^^^^^^ evaluation of `_NI32_MUL` failed here error[E0080]: attempt to compute `i32::MAX * 5_i32`, which would overflow - --> $DIR/overflowing-consts.rs:173:28 + --> $DIR/overflowing-consts.rs:172:28 | LL | const _NI32_MUL_P: &i32 = &(i32::MAX * 5); | ^^^^^^^^^^^^^^ evaluation of `_NI32_MUL_P` failed here error[E0080]: attempt to compute `i64::MAX * 5_i64`, which would overflow - --> $DIR/overflowing-consts.rs:175:24 + --> $DIR/overflowing-consts.rs:174:24 | LL | const _NI64_MUL: i64 = i64::MAX * 5; | ^^^^^^^^^^^^ evaluation of `_NI64_MUL` failed here error[E0080]: attempt to compute `i64::MAX * 5_i64`, which would overflow - --> $DIR/overflowing-consts.rs:176:28 + --> $DIR/overflowing-consts.rs:175:28 | LL | const _NI64_MUL_P: &i64 = &(i64::MAX * 5); | ^^^^^^^^^^^^^^ evaluation of `_NI64_MUL_P` failed here error[E0080]: attempt to compute `i128::MAX * 5_i128`, which would overflow - --> $DIR/overflowing-consts.rs:178:26 + --> $DIR/overflowing-consts.rs:177:26 | LL | const _NI128_MUL: i128 = i128::MAX * 5; | ^^^^^^^^^^^^^ evaluation of `_NI128_MUL` failed here error[E0080]: attempt to compute `i128::MAX * 5_i128`, which would overflow - --> $DIR/overflowing-consts.rs:179:30 + --> $DIR/overflowing-consts.rs:178:30 | LL | const _NI128_MUL_P: &i128 = &(i128::MAX * 5); | ^^^^^^^^^^^^^^^ evaluation of `_NI128_MUL_P` failed here error[E0080]: attempt to compute `u8::MAX * 5_u8`, which would overflow - --> $DIR/overflowing-consts.rs:181:22 + --> $DIR/overflowing-consts.rs:180:22 | LL | const _NU8_MUL: u8 = u8::MAX * 5; | ^^^^^^^^^^^ evaluation of `_NU8_MUL` failed here error[E0080]: attempt to compute `u8::MAX * 5_u8`, which would overflow - --> $DIR/overflowing-consts.rs:182:26 + --> $DIR/overflowing-consts.rs:181:26 | LL | const _NU8_MUL_P: &u8 = &(u8::MAX * 5); | ^^^^^^^^^^^^^ evaluation of `_NU8_MUL_P` failed here error[E0080]: attempt to compute `u16::MAX * 5_u16`, which would overflow - --> $DIR/overflowing-consts.rs:184:24 + --> $DIR/overflowing-consts.rs:183:24 | LL | const _NU16_MUL: u16 = u16::MAX * 5; | ^^^^^^^^^^^^ evaluation of `_NU16_MUL` failed here error[E0080]: attempt to compute `u16::MAX * 5_u16`, which would overflow - --> $DIR/overflowing-consts.rs:185:28 + --> $DIR/overflowing-consts.rs:184:28 | LL | const _NU16_MUL_P: &u16 = &(u16::MAX * 5); | ^^^^^^^^^^^^^^ evaluation of `_NU16_MUL_P` failed here error[E0080]: attempt to compute `u32::MAX * 5_u32`, which would overflow - --> $DIR/overflowing-consts.rs:187:24 + --> $DIR/overflowing-consts.rs:186:24 | LL | const _NU32_MUL: u32 = u32::MAX * 5; | ^^^^^^^^^^^^ evaluation of `_NU32_MUL` failed here error[E0080]: attempt to compute `u32::MAX * 5_u32`, which would overflow - --> $DIR/overflowing-consts.rs:188:28 + --> $DIR/overflowing-consts.rs:187:28 | LL | const _NU32_MUL_P: &u32 = &(u32::MAX * 5); | ^^^^^^^^^^^^^^ evaluation of `_NU32_MUL_P` failed here error[E0080]: attempt to compute `u64::MAX * 5_u64`, which would overflow - --> $DIR/overflowing-consts.rs:190:24 + --> $DIR/overflowing-consts.rs:189:24 | LL | const _NU64_MUL: u64 = u64::MAX * 5; | ^^^^^^^^^^^^ evaluation of `_NU64_MUL` failed here error[E0080]: attempt to compute `u64::MAX * 5_u64`, which would overflow - --> $DIR/overflowing-consts.rs:191:28 + --> $DIR/overflowing-consts.rs:190:28 | LL | const _NU64_MUL_P: &u64 = &(u64::MAX * 5); | ^^^^^^^^^^^^^^ evaluation of `_NU64_MUL_P` failed here error[E0080]: attempt to compute `u128::MAX * 5_u128`, which would overflow - --> $DIR/overflowing-consts.rs:193:26 + --> $DIR/overflowing-consts.rs:192:26 | LL | const _NU128_MUL: u128 = u128::MAX * 5; | ^^^^^^^^^^^^^ evaluation of `_NU128_MUL` failed here error[E0080]: attempt to compute `u128::MAX * 5_u128`, which would overflow - --> $DIR/overflowing-consts.rs:194:30 + --> $DIR/overflowing-consts.rs:193:30 | LL | const _NU128_MUL_P: &u128 = &(u128::MAX * 5); | ^^^^^^^^^^^^^^^ evaluation of `_NU128_MUL_P` failed here error[E0080]: attempt to compute `isize::MAX * 5_isize`, which would overflow - --> $DIR/overflowing-consts.rs:196:28 + --> $DIR/overflowing-consts.rs:195:28 | LL | const _NISIZE_MUL: isize = isize::MAX * 5; | ^^^^^^^^^^^^^^ evaluation of `_NISIZE_MUL` failed here error[E0080]: attempt to compute `isize::MAX * 5_isize`, which would overflow - --> $DIR/overflowing-consts.rs:197:32 + --> $DIR/overflowing-consts.rs:196:32 | LL | const _NISIZE_MUL_P: &isize = &(isize::MAX * 5); | ^^^^^^^^^^^^^^^^ evaluation of `_NISIZE_MUL_P` failed here error[E0080]: attempt to compute `usize::MAX * 5_usize`, which would overflow - --> $DIR/overflowing-consts.rs:199:28 + --> $DIR/overflowing-consts.rs:198:28 | LL | const _NUSIZE_MUL: usize = usize::MAX * 5; | ^^^^^^^^^^^^^^ evaluation of `_NUSIZE_MUL` failed here error[E0080]: attempt to compute `usize::MAX * 5_usize`, which would overflow - --> $DIR/overflowing-consts.rs:200:32 + --> $DIR/overflowing-consts.rs:199:32 | LL | const _NUSIZE_MUL_P: &usize = &(usize::MAX * 5); | ^^^^^^^^^^^^^^^^ evaluation of `_NUSIZE_MUL_P` failed here error[E0080]: attempt to divide `1_i8` by zero - --> $DIR/overflowing-consts.rs:203:22 + --> $DIR/overflowing-consts.rs:202:22 | LL | const _NI8_DIV: i8 = 1i8 / 0; | ^^^^^^^ evaluation of `_NI8_DIV` failed here error[E0080]: attempt to divide `1_i8` by zero - --> $DIR/overflowing-consts.rs:204:26 + --> $DIR/overflowing-consts.rs:203:26 | LL | const _NI8_DIV_P: &i8 = &(1i8 / 0); | ^^^^^^^^^ evaluation of `_NI8_DIV_P` failed here error[E0080]: attempt to divide `1_i16` by zero - --> $DIR/overflowing-consts.rs:206:24 + --> $DIR/overflowing-consts.rs:205:24 | LL | const _NI16_DIV: i16 = 1i16 / 0; | ^^^^^^^^ evaluation of `_NI16_DIV` failed here error[E0080]: attempt to divide `1_i16` by zero - --> $DIR/overflowing-consts.rs:207:28 + --> $DIR/overflowing-consts.rs:206:28 | LL | const _NI16_DIV_P: &i16 = &(1i16 / 0); | ^^^^^^^^^^ evaluation of `_NI16_DIV_P` failed here error[E0080]: attempt to divide `1_i32` by zero - --> $DIR/overflowing-consts.rs:209:24 + --> $DIR/overflowing-consts.rs:208:24 | LL | const _NI32_DIV: i32 = 1i32 / 0; | ^^^^^^^^ evaluation of `_NI32_DIV` failed here error[E0080]: attempt to divide `1_i32` by zero - --> $DIR/overflowing-consts.rs:210:28 + --> $DIR/overflowing-consts.rs:209:28 | LL | const _NI32_DIV_P: &i32 = &(1i32 / 0); | ^^^^^^^^^^ evaluation of `_NI32_DIV_P` failed here error[E0080]: attempt to divide `1_i64` by zero - --> $DIR/overflowing-consts.rs:212:24 + --> $DIR/overflowing-consts.rs:211:24 | LL | const _NI64_DIV: i64 = 1i64 / 0; | ^^^^^^^^ evaluation of `_NI64_DIV` failed here error[E0080]: attempt to divide `1_i64` by zero - --> $DIR/overflowing-consts.rs:213:28 + --> $DIR/overflowing-consts.rs:212:28 | LL | const _NI64_DIV_P: &i64 = &(1i64 / 0); | ^^^^^^^^^^ evaluation of `_NI64_DIV_P` failed here error[E0080]: attempt to divide `1_i128` by zero - --> $DIR/overflowing-consts.rs:215:26 + --> $DIR/overflowing-consts.rs:214:26 | LL | const _NI128_DIV: i128 = 1i128 / 0; | ^^^^^^^^^ evaluation of `_NI128_DIV` failed here error[E0080]: attempt to divide `1_i128` by zero - --> $DIR/overflowing-consts.rs:216:30 + --> $DIR/overflowing-consts.rs:215:30 | LL | const _NI128_DIV_P: &i128 = &(1i128 / 0); | ^^^^^^^^^^^ evaluation of `_NI128_DIV_P` failed here error[E0080]: attempt to divide `1_u8` by zero - --> $DIR/overflowing-consts.rs:218:22 + --> $DIR/overflowing-consts.rs:217:22 | LL | const _NU8_DIV: u8 = 1u8 / 0; | ^^^^^^^ evaluation of `_NU8_DIV` failed here error[E0080]: attempt to divide `1_u8` by zero - --> $DIR/overflowing-consts.rs:219:26 + --> $DIR/overflowing-consts.rs:218:26 | LL | const _NU8_DIV_P: &u8 = &(1u8 / 0); | ^^^^^^^^^ evaluation of `_NU8_DIV_P` failed here error[E0080]: attempt to divide `1_u16` by zero - --> $DIR/overflowing-consts.rs:221:24 + --> $DIR/overflowing-consts.rs:220:24 | LL | const _NU16_DIV: u16 = 1u16 / 0; | ^^^^^^^^ evaluation of `_NU16_DIV` failed here error[E0080]: attempt to divide `1_u16` by zero - --> $DIR/overflowing-consts.rs:222:28 + --> $DIR/overflowing-consts.rs:221:28 | LL | const _NU16_DIV_P: &u16 = &(1u16 / 0); | ^^^^^^^^^^ evaluation of `_NU16_DIV_P` failed here error[E0080]: attempt to divide `1_u32` by zero - --> $DIR/overflowing-consts.rs:224:24 + --> $DIR/overflowing-consts.rs:223:24 | LL | const _NU32_DIV: u32 = 1u32 / 0; | ^^^^^^^^ evaluation of `_NU32_DIV` failed here error[E0080]: attempt to divide `1_u32` by zero - --> $DIR/overflowing-consts.rs:225:28 + --> $DIR/overflowing-consts.rs:224:28 | LL | const _NU32_DIV_P: &u32 = &(1u32 / 0); | ^^^^^^^^^^ evaluation of `_NU32_DIV_P` failed here error[E0080]: attempt to divide `1_u64` by zero - --> $DIR/overflowing-consts.rs:227:24 + --> $DIR/overflowing-consts.rs:226:24 | LL | const _NU64_DIV: u64 = 1u64 / 0; | ^^^^^^^^ evaluation of `_NU64_DIV` failed here error[E0080]: attempt to divide `1_u64` by zero - --> $DIR/overflowing-consts.rs:228:28 + --> $DIR/overflowing-consts.rs:227:28 | LL | const _NU64_DIV_P: &u64 = &(1u64 / 0); | ^^^^^^^^^^ evaluation of `_NU64_DIV_P` failed here error[E0080]: attempt to divide `1_u128` by zero - --> $DIR/overflowing-consts.rs:230:26 + --> $DIR/overflowing-consts.rs:229:26 | LL | const _NU128_DIV: u128 = 1u128 / 0; | ^^^^^^^^^ evaluation of `_NU128_DIV` failed here error[E0080]: attempt to divide `1_u128` by zero - --> $DIR/overflowing-consts.rs:231:30 + --> $DIR/overflowing-consts.rs:230:30 | LL | const _NU128_DIV_P: &u128 = &(1u128 / 0); | ^^^^^^^^^^^ evaluation of `_NU128_DIV_P` failed here error[E0080]: attempt to divide `1_isize` by zero - --> $DIR/overflowing-consts.rs:233:28 + --> $DIR/overflowing-consts.rs:232:28 | LL | const _NISIZE_DIV: isize = 1isize / 0; | ^^^^^^^^^^ evaluation of `_NISIZE_DIV` failed here error[E0080]: attempt to divide `1_isize` by zero - --> $DIR/overflowing-consts.rs:234:32 + --> $DIR/overflowing-consts.rs:233:32 | LL | const _NISIZE_DIV_P: &isize = &(1isize / 0); | ^^^^^^^^^^^^ evaluation of `_NISIZE_DIV_P` failed here error[E0080]: attempt to divide `1_usize` by zero - --> $DIR/overflowing-consts.rs:236:28 + --> $DIR/overflowing-consts.rs:235:28 | LL | const _NUSIZE_DIV: usize = 1usize / 0; | ^^^^^^^^^^ evaluation of `_NUSIZE_DIV` failed here error[E0080]: attempt to divide `1_usize` by zero - --> $DIR/overflowing-consts.rs:237:32 + --> $DIR/overflowing-consts.rs:236:32 | LL | const _NUSIZE_DIV_P: &usize = &(1usize / 0); | ^^^^^^^^^^^^ evaluation of `_NUSIZE_DIV_P` failed here error[E0080]: attempt to calculate the remainder of `1_i8` with a divisor of zero - --> $DIR/overflowing-consts.rs:240:22 + --> $DIR/overflowing-consts.rs:239:22 | LL | const _NI8_MOD: i8 = 1i8 % 0; | ^^^^^^^ evaluation of `_NI8_MOD` failed here error[E0080]: attempt to calculate the remainder of `1_i8` with a divisor of zero - --> $DIR/overflowing-consts.rs:241:26 + --> $DIR/overflowing-consts.rs:240:26 | LL | const _NI8_MOD_P: &i8 = &(1i8 % 0); | ^^^^^^^^^ evaluation of `_NI8_MOD_P` failed here error[E0080]: attempt to calculate the remainder of `1_i16` with a divisor of zero - --> $DIR/overflowing-consts.rs:243:24 + --> $DIR/overflowing-consts.rs:242:24 | LL | const _NI16_MOD: i16 = 1i16 % 0; | ^^^^^^^^ evaluation of `_NI16_MOD` failed here error[E0080]: attempt to calculate the remainder of `1_i16` with a divisor of zero - --> $DIR/overflowing-consts.rs:244:28 + --> $DIR/overflowing-consts.rs:243:28 | LL | const _NI16_MOD_P: &i16 = &(1i16 % 0); | ^^^^^^^^^^ evaluation of `_NI16_MOD_P` failed here error[E0080]: attempt to calculate the remainder of `1_i32` with a divisor of zero - --> $DIR/overflowing-consts.rs:246:24 + --> $DIR/overflowing-consts.rs:245:24 | LL | const _NI32_MOD: i32 = 1i32 % 0; | ^^^^^^^^ evaluation of `_NI32_MOD` failed here error[E0080]: attempt to calculate the remainder of `1_i32` with a divisor of zero - --> $DIR/overflowing-consts.rs:247:28 + --> $DIR/overflowing-consts.rs:246:28 | LL | const _NI32_MOD_P: &i32 = &(1i32 % 0); | ^^^^^^^^^^ evaluation of `_NI32_MOD_P` failed here error[E0080]: attempt to calculate the remainder of `1_i64` with a divisor of zero - --> $DIR/overflowing-consts.rs:249:24 + --> $DIR/overflowing-consts.rs:248:24 | LL | const _NI64_MOD: i64 = 1i64 % 0; | ^^^^^^^^ evaluation of `_NI64_MOD` failed here error[E0080]: attempt to calculate the remainder of `1_i64` with a divisor of zero - --> $DIR/overflowing-consts.rs:250:28 + --> $DIR/overflowing-consts.rs:249:28 | LL | const _NI64_MOD_P: &i64 = &(1i64 % 0); | ^^^^^^^^^^ evaluation of `_NI64_MOD_P` failed here error[E0080]: attempt to calculate the remainder of `1_i128` with a divisor of zero - --> $DIR/overflowing-consts.rs:252:26 + --> $DIR/overflowing-consts.rs:251:26 | LL | const _NI128_MOD: i128 = 1i128 % 0; | ^^^^^^^^^ evaluation of `_NI128_MOD` failed here error[E0080]: attempt to calculate the remainder of `1_i128` with a divisor of zero - --> $DIR/overflowing-consts.rs:253:30 + --> $DIR/overflowing-consts.rs:252:30 | LL | const _NI128_MOD_P: &i128 = &(1i128 % 0); | ^^^^^^^^^^^ evaluation of `_NI128_MOD_P` failed here error[E0080]: attempt to calculate the remainder of `1_u8` with a divisor of zero - --> $DIR/overflowing-consts.rs:255:22 + --> $DIR/overflowing-consts.rs:254:22 | LL | const _NU8_MOD: u8 = 1u8 % 0; | ^^^^^^^ evaluation of `_NU8_MOD` failed here error[E0080]: attempt to calculate the remainder of `1_u8` with a divisor of zero - --> $DIR/overflowing-consts.rs:256:26 + --> $DIR/overflowing-consts.rs:255:26 | LL | const _NU8_MOD_P: &u8 = &(1u8 % 0); | ^^^^^^^^^ evaluation of `_NU8_MOD_P` failed here error[E0080]: attempt to calculate the remainder of `1_u16` with a divisor of zero - --> $DIR/overflowing-consts.rs:258:24 + --> $DIR/overflowing-consts.rs:257:24 | LL | const _NU16_MOD: u16 = 1u16 % 0; | ^^^^^^^^ evaluation of `_NU16_MOD` failed here error[E0080]: attempt to calculate the remainder of `1_u16` with a divisor of zero - --> $DIR/overflowing-consts.rs:259:28 + --> $DIR/overflowing-consts.rs:258:28 | LL | const _NU16_MOD_P: &u16 = &(1u16 % 0); | ^^^^^^^^^^ evaluation of `_NU16_MOD_P` failed here error[E0080]: attempt to calculate the remainder of `1_u32` with a divisor of zero - --> $DIR/overflowing-consts.rs:261:24 + --> $DIR/overflowing-consts.rs:260:24 | LL | const _NU32_MOD: u32 = 1u32 % 0; | ^^^^^^^^ evaluation of `_NU32_MOD` failed here error[E0080]: attempt to calculate the remainder of `1_u32` with a divisor of zero - --> $DIR/overflowing-consts.rs:262:28 + --> $DIR/overflowing-consts.rs:261:28 | LL | const _NU32_MOD_P: &u32 = &(1u32 % 0); | ^^^^^^^^^^ evaluation of `_NU32_MOD_P` failed here error[E0080]: attempt to calculate the remainder of `1_u64` with a divisor of zero - --> $DIR/overflowing-consts.rs:264:24 + --> $DIR/overflowing-consts.rs:263:24 | LL | const _NU64_MOD: u64 = 1u64 % 0; | ^^^^^^^^ evaluation of `_NU64_MOD` failed here error[E0080]: attempt to calculate the remainder of `1_u64` with a divisor of zero - --> $DIR/overflowing-consts.rs:265:28 + --> $DIR/overflowing-consts.rs:264:28 | LL | const _NU64_MOD_P: &u64 = &(1u64 % 0); | ^^^^^^^^^^ evaluation of `_NU64_MOD_P` failed here error[E0080]: attempt to calculate the remainder of `1_u128` with a divisor of zero - --> $DIR/overflowing-consts.rs:267:26 + --> $DIR/overflowing-consts.rs:266:26 | LL | const _NU128_MOD: u128 = 1u128 % 0; | ^^^^^^^^^ evaluation of `_NU128_MOD` failed here error[E0080]: attempt to calculate the remainder of `1_u128` with a divisor of zero - --> $DIR/overflowing-consts.rs:268:30 + --> $DIR/overflowing-consts.rs:267:30 | LL | const _NU128_MOD_P: &u128 = &(1u128 % 0); | ^^^^^^^^^^^ evaluation of `_NU128_MOD_P` failed here error[E0080]: attempt to calculate the remainder of `1_isize` with a divisor of zero - --> $DIR/overflowing-consts.rs:270:28 + --> $DIR/overflowing-consts.rs:269:28 | LL | const _NISIZE_MOD: isize = 1isize % 0; | ^^^^^^^^^^ evaluation of `_NISIZE_MOD` failed here error[E0080]: attempt to calculate the remainder of `1_isize` with a divisor of zero - --> $DIR/overflowing-consts.rs:271:32 + --> $DIR/overflowing-consts.rs:270:32 | LL | const _NISIZE_MOD_P: &isize = &(1isize % 0); | ^^^^^^^^^^^^ evaluation of `_NISIZE_MOD_P` failed here error[E0080]: attempt to calculate the remainder of `1_usize` with a divisor of zero - --> $DIR/overflowing-consts.rs:273:28 + --> $DIR/overflowing-consts.rs:272:28 | LL | const _NUSIZE_MOD: usize = 1usize % 0; | ^^^^^^^^^^ evaluation of `_NUSIZE_MOD` failed here error[E0080]: attempt to calculate the remainder of `1_usize` with a divisor of zero - --> $DIR/overflowing-consts.rs:274:32 + --> $DIR/overflowing-consts.rs:273:32 | LL | const _NUSIZE_MOD_P: &usize = &(1usize % 0); | ^^^^^^^^^^^^ evaluation of `_NUSIZE_MOD_P` failed here error[E0080]: index out of bounds: the length is 3 but the index is 4 - --> $DIR/overflowing-consts.rs:277:24 + --> $DIR/overflowing-consts.rs:276:24 | LL | const _NI32_OOB: i32 = [1, 2, 3][4]; | ^^^^^^^^^^^^ evaluation of `_NI32_OOB` failed here error[E0080]: index out of bounds: the length is 3 but the index is 4 - --> $DIR/overflowing-consts.rs:278:28 + --> $DIR/overflowing-consts.rs:277:28 | LL | const _NI32_OOB_P: &i32 = &([1, 2, 3][4]); | ^^^^^^^^^^^^^^ evaluation of `_NI32_OOB_P` failed here diff --git a/tests/ui/consts/overflowing-consts.opt_with_overflow_checks.stderr b/tests/ui/consts/overflowing-consts.opt_with_overflow_checks.stderr index 1ef2a60b64749..e7203cf8399ff 100644 --- a/tests/ui/consts/overflowing-consts.opt_with_overflow_checks.stderr +++ b/tests/ui/consts/overflowing-consts.opt_with_overflow_checks.stderr @@ -1,1019 +1,1019 @@ error[E0080]: attempt to shift left by `8_i32`, which would overflow - --> $DIR/overflowing-consts.rs:18:22 + --> $DIR/overflowing-consts.rs:17:22 | LL | const _NI8_SHL: i8 = 1i8 << 8; | ^^^^^^^^ evaluation of `_NI8_SHL` failed here error[E0080]: attempt to shift left by `8_i32`, which would overflow - --> $DIR/overflowing-consts.rs:19:26 + --> $DIR/overflowing-consts.rs:18:26 | LL | const _NI8_SHL_P: &i8 = &(1i8 << 8); | ^^^^^^^^^^ evaluation of `_NI8_SHL_P` failed here error[E0080]: attempt to shift left by `16_i32`, which would overflow - --> $DIR/overflowing-consts.rs:21:24 + --> $DIR/overflowing-consts.rs:20:24 | LL | const _NI16_SHL: i16 = 1i16 << 16; | ^^^^^^^^^^ evaluation of `_NI16_SHL` failed here error[E0080]: attempt to shift left by `16_i32`, which would overflow - --> $DIR/overflowing-consts.rs:22:28 + --> $DIR/overflowing-consts.rs:21:28 | LL | const _NI16_SHL_P: &i16 = &(1i16 << 16); | ^^^^^^^^^^^^ evaluation of `_NI16_SHL_P` failed here error[E0080]: attempt to shift left by `32_i32`, which would overflow - --> $DIR/overflowing-consts.rs:24:24 + --> $DIR/overflowing-consts.rs:23:24 | LL | const _NI32_SHL: i32 = 1i32 << 32; | ^^^^^^^^^^ evaluation of `_NI32_SHL` failed here error[E0080]: attempt to shift left by `32_i32`, which would overflow - --> $DIR/overflowing-consts.rs:25:28 + --> $DIR/overflowing-consts.rs:24:28 | LL | const _NI32_SHL_P: &i32 = &(1i32 << 32); | ^^^^^^^^^^^^ evaluation of `_NI32_SHL_P` failed here error[E0080]: attempt to shift left by `64_i32`, which would overflow - --> $DIR/overflowing-consts.rs:27:24 + --> $DIR/overflowing-consts.rs:26:24 | LL | const _NI64_SHL: i64 = 1i64 << 64; | ^^^^^^^^^^ evaluation of `_NI64_SHL` failed here error[E0080]: attempt to shift left by `64_i32`, which would overflow - --> $DIR/overflowing-consts.rs:28:28 + --> $DIR/overflowing-consts.rs:27:28 | LL | const _NI64_SHL_P: &i64 = &(1i64 << 64); | ^^^^^^^^^^^^ evaluation of `_NI64_SHL_P` failed here error[E0080]: attempt to shift left by `128_i32`, which would overflow - --> $DIR/overflowing-consts.rs:30:26 + --> $DIR/overflowing-consts.rs:29:26 | LL | const _NI128_SHL: i128 = 1i128 << 128; | ^^^^^^^^^^^^ evaluation of `_NI128_SHL` failed here error[E0080]: attempt to shift left by `128_i32`, which would overflow - --> $DIR/overflowing-consts.rs:31:30 + --> $DIR/overflowing-consts.rs:30:30 | LL | const _NI128_SHL_P: &i128 = &(1i128 << 128); | ^^^^^^^^^^^^^^ evaluation of `_NI128_SHL_P` failed here error[E0080]: attempt to shift left by `8_i32`, which would overflow - --> $DIR/overflowing-consts.rs:33:22 + --> $DIR/overflowing-consts.rs:32:22 | LL | const _NU8_SHL: u8 = 1u8 << 8; | ^^^^^^^^ evaluation of `_NU8_SHL` failed here error[E0080]: attempt to shift left by `8_i32`, which would overflow - --> $DIR/overflowing-consts.rs:34:26 + --> $DIR/overflowing-consts.rs:33:26 | LL | const _NU8_SHL_P: &u8 = &(1u8 << 8); | ^^^^^^^^^^ evaluation of `_NU8_SHL_P` failed here error[E0080]: attempt to shift left by `16_i32`, which would overflow - --> $DIR/overflowing-consts.rs:36:24 + --> $DIR/overflowing-consts.rs:35:24 | LL | const _NU16_SHL: u16 = 1u16 << 16; | ^^^^^^^^^^ evaluation of `_NU16_SHL` failed here error[E0080]: attempt to shift left by `16_i32`, which would overflow - --> $DIR/overflowing-consts.rs:37:28 + --> $DIR/overflowing-consts.rs:36:28 | LL | const _NU16_SHL_P: &u16 = &(1u16 << 16); | ^^^^^^^^^^^^ evaluation of `_NU16_SHL_P` failed here error[E0080]: attempt to shift left by `32_i32`, which would overflow - --> $DIR/overflowing-consts.rs:39:24 + --> $DIR/overflowing-consts.rs:38:24 | LL | const _NU32_SHL: u32 = 1u32 << 32; | ^^^^^^^^^^ evaluation of `_NU32_SHL` failed here error[E0080]: attempt to shift left by `32_i32`, which would overflow - --> $DIR/overflowing-consts.rs:40:28 + --> $DIR/overflowing-consts.rs:39:28 | LL | const _NU32_SHL_P: &u32 = &(1u32 << 32); | ^^^^^^^^^^^^ evaluation of `_NU32_SHL_P` failed here error[E0080]: attempt to shift left by `64_i32`, which would overflow - --> $DIR/overflowing-consts.rs:42:24 + --> $DIR/overflowing-consts.rs:41:24 | LL | const _NU64_SHL: u64 = 1u64 << 64; | ^^^^^^^^^^ evaluation of `_NU64_SHL` failed here error[E0080]: attempt to shift left by `64_i32`, which would overflow - --> $DIR/overflowing-consts.rs:43:28 + --> $DIR/overflowing-consts.rs:42:28 | LL | const _NU64_SHL_P: &u64 = &(1u64 << 64); | ^^^^^^^^^^^^ evaluation of `_NU64_SHL_P` failed here error[E0080]: attempt to shift left by `128_i32`, which would overflow - --> $DIR/overflowing-consts.rs:45:26 + --> $DIR/overflowing-consts.rs:44:26 | LL | const _NU128_SHL: u128 = 1u128 << 128; | ^^^^^^^^^^^^ evaluation of `_NU128_SHL` failed here error[E0080]: attempt to shift left by `128_i32`, which would overflow - --> $DIR/overflowing-consts.rs:46:30 + --> $DIR/overflowing-consts.rs:45:30 | LL | const _NU128_SHL_P: &u128 = &(1u128 << 128); | ^^^^^^^^^^^^^^ evaluation of `_NU128_SHL_P` failed here error[E0080]: attempt to shift left by `%BITS%`, which would overflow - --> $DIR/overflowing-consts.rs:48:28 + --> $DIR/overflowing-consts.rs:47:28 | LL | const _NISIZE_SHL: isize = 1isize << BITS; | ^^^^^^^^^^^^^^ evaluation of `_NISIZE_SHL` failed here error[E0080]: attempt to shift left by `%BITS%`, which would overflow - --> $DIR/overflowing-consts.rs:49:32 + --> $DIR/overflowing-consts.rs:48:32 | LL | const _NISIZE_SHL_P: &isize = &(1isize << BITS); | ^^^^^^^^^^^^^^^^ evaluation of `_NISIZE_SHL_P` failed here error[E0080]: attempt to shift left by `%BITS%`, which would overflow - --> $DIR/overflowing-consts.rs:51:28 + --> $DIR/overflowing-consts.rs:50:28 | LL | const _NUSIZE_SHL: usize = 1usize << BITS; | ^^^^^^^^^^^^^^ evaluation of `_NUSIZE_SHL` failed here error[E0080]: attempt to shift left by `%BITS%`, which would overflow - --> $DIR/overflowing-consts.rs:52:32 + --> $DIR/overflowing-consts.rs:51:32 | LL | const _NUSIZE_SHL_P: &usize = &(1usize << BITS); | ^^^^^^^^^^^^^^^^ evaluation of `_NUSIZE_SHL_P` failed here error[E0080]: attempt to shift right by `8_i32`, which would overflow - --> $DIR/overflowing-consts.rs:55:22 + --> $DIR/overflowing-consts.rs:54:22 | LL | const _NI8_SHR: i8 = 1i8 >> 8; | ^^^^^^^^ evaluation of `_NI8_SHR` failed here error[E0080]: attempt to shift right by `8_i32`, which would overflow - --> $DIR/overflowing-consts.rs:56:26 + --> $DIR/overflowing-consts.rs:55:26 | LL | const _NI8_SHR_P: &i8 = &(1i8 >> 8); | ^^^^^^^^^^ evaluation of `_NI8_SHR_P` failed here error[E0080]: attempt to shift right by `16_i32`, which would overflow - --> $DIR/overflowing-consts.rs:58:24 + --> $DIR/overflowing-consts.rs:57:24 | LL | const _NI16_SHR: i16 = 1i16 >> 16; | ^^^^^^^^^^ evaluation of `_NI16_SHR` failed here error[E0080]: attempt to shift right by `16_i32`, which would overflow - --> $DIR/overflowing-consts.rs:59:28 + --> $DIR/overflowing-consts.rs:58:28 | LL | const _NI16_SHR_P: &i16 = &(1i16 >> 16); | ^^^^^^^^^^^^ evaluation of `_NI16_SHR_P` failed here error[E0080]: attempt to shift right by `32_i32`, which would overflow - --> $DIR/overflowing-consts.rs:61:24 + --> $DIR/overflowing-consts.rs:60:24 | LL | const _NI32_SHR: i32 = 1i32 >> 32; | ^^^^^^^^^^ evaluation of `_NI32_SHR` failed here error[E0080]: attempt to shift right by `32_i32`, which would overflow - --> $DIR/overflowing-consts.rs:62:28 + --> $DIR/overflowing-consts.rs:61:28 | LL | const _NI32_SHR_P: &i32 = &(1i32 >> 32); | ^^^^^^^^^^^^ evaluation of `_NI32_SHR_P` failed here error[E0080]: attempt to shift right by `64_i32`, which would overflow - --> $DIR/overflowing-consts.rs:64:24 + --> $DIR/overflowing-consts.rs:63:24 | LL | const _NI64_SHR: i64 = 1i64 >> 64; | ^^^^^^^^^^ evaluation of `_NI64_SHR` failed here error[E0080]: attempt to shift right by `64_i32`, which would overflow - --> $DIR/overflowing-consts.rs:65:28 + --> $DIR/overflowing-consts.rs:64:28 | LL | const _NI64_SHR_P: &i64 = &(1i64 >> 64); | ^^^^^^^^^^^^ evaluation of `_NI64_SHR_P` failed here error[E0080]: attempt to shift right by `128_i32`, which would overflow - --> $DIR/overflowing-consts.rs:67:26 + --> $DIR/overflowing-consts.rs:66:26 | LL | const _NI128_SHR: i128 = 1i128 >> 128; | ^^^^^^^^^^^^ evaluation of `_NI128_SHR` failed here error[E0080]: attempt to shift right by `128_i32`, which would overflow - --> $DIR/overflowing-consts.rs:68:30 + --> $DIR/overflowing-consts.rs:67:30 | LL | const _NI128_SHR_P: &i128 = &(1i128 >> 128); | ^^^^^^^^^^^^^^ evaluation of `_NI128_SHR_P` failed here error[E0080]: attempt to shift right by `8_i32`, which would overflow - --> $DIR/overflowing-consts.rs:70:22 + --> $DIR/overflowing-consts.rs:69:22 | LL | const _NU8_SHR: u8 = 1u8 >> 8; | ^^^^^^^^ evaluation of `_NU8_SHR` failed here error[E0080]: attempt to shift right by `8_i32`, which would overflow - --> $DIR/overflowing-consts.rs:71:26 + --> $DIR/overflowing-consts.rs:70:26 | LL | const _NU8_SHR_P: &u8 = &(1u8 >> 8); | ^^^^^^^^^^ evaluation of `_NU8_SHR_P` failed here error[E0080]: attempt to shift right by `16_i32`, which would overflow - --> $DIR/overflowing-consts.rs:73:24 + --> $DIR/overflowing-consts.rs:72:24 | LL | const _NU16_SHR: u16 = 1u16 >> 16; | ^^^^^^^^^^ evaluation of `_NU16_SHR` failed here error[E0080]: attempt to shift right by `16_i32`, which would overflow - --> $DIR/overflowing-consts.rs:74:28 + --> $DIR/overflowing-consts.rs:73:28 | LL | const _NU16_SHR_P: &u16 = &(1u16 >> 16); | ^^^^^^^^^^^^ evaluation of `_NU16_SHR_P` failed here error[E0080]: attempt to shift right by `32_i32`, which would overflow - --> $DIR/overflowing-consts.rs:76:24 + --> $DIR/overflowing-consts.rs:75:24 | LL | const _NU32_SHR: u32 = 1u32 >> 32; | ^^^^^^^^^^ evaluation of `_NU32_SHR` failed here error[E0080]: attempt to shift right by `32_i32`, which would overflow - --> $DIR/overflowing-consts.rs:77:28 + --> $DIR/overflowing-consts.rs:76:28 | LL | const _NU32_SHR_P: &u32 = &(1u32 >> 32); | ^^^^^^^^^^^^ evaluation of `_NU32_SHR_P` failed here error[E0080]: attempt to shift right by `64_i32`, which would overflow - --> $DIR/overflowing-consts.rs:79:24 + --> $DIR/overflowing-consts.rs:78:24 | LL | const _NU64_SHR: u64 = 1u64 >> 64; | ^^^^^^^^^^ evaluation of `_NU64_SHR` failed here error[E0080]: attempt to shift right by `64_i32`, which would overflow - --> $DIR/overflowing-consts.rs:80:28 + --> $DIR/overflowing-consts.rs:79:28 | LL | const _NU64_SHR_P: &u64 = &(1u64 >> 64); | ^^^^^^^^^^^^ evaluation of `_NU64_SHR_P` failed here error[E0080]: attempt to shift right by `128_i32`, which would overflow - --> $DIR/overflowing-consts.rs:82:26 + --> $DIR/overflowing-consts.rs:81:26 | LL | const _NU128_SHR: u128 = 1u128 >> 128; | ^^^^^^^^^^^^ evaluation of `_NU128_SHR` failed here error[E0080]: attempt to shift right by `128_i32`, which would overflow - --> $DIR/overflowing-consts.rs:83:30 + --> $DIR/overflowing-consts.rs:82:30 | LL | const _NU128_SHR_P: &u128 = &(1u128 >> 128); | ^^^^^^^^^^^^^^ evaluation of `_NU128_SHR_P` failed here error[E0080]: attempt to shift right by `%BITS%`, which would overflow - --> $DIR/overflowing-consts.rs:85:28 + --> $DIR/overflowing-consts.rs:84:28 | LL | const _NISIZE_SHR: isize = 1isize >> BITS; | ^^^^^^^^^^^^^^ evaluation of `_NISIZE_SHR` failed here error[E0080]: attempt to shift right by `%BITS%`, which would overflow - --> $DIR/overflowing-consts.rs:86:32 + --> $DIR/overflowing-consts.rs:85:32 | LL | const _NISIZE_SHR_P: &isize = &(1isize >> BITS); | ^^^^^^^^^^^^^^^^ evaluation of `_NISIZE_SHR_P` failed here error[E0080]: attempt to shift right by `%BITS%`, which would overflow - --> $DIR/overflowing-consts.rs:88:28 + --> $DIR/overflowing-consts.rs:87:28 | LL | const _NUSIZE_SHR: usize = 1usize >> BITS; | ^^^^^^^^^^^^^^ evaluation of `_NUSIZE_SHR` failed here error[E0080]: attempt to shift right by `%BITS%`, which would overflow - --> $DIR/overflowing-consts.rs:89:32 + --> $DIR/overflowing-consts.rs:88:32 | LL | const _NUSIZE_SHR_P: &usize = &(1usize >> BITS); | ^^^^^^^^^^^^^^^^ evaluation of `_NUSIZE_SHR_P` failed here error[E0080]: attempt to compute `1_i8 + i8::MAX`, which would overflow - --> $DIR/overflowing-consts.rs:92:22 + --> $DIR/overflowing-consts.rs:91:22 | LL | const _NI8_ADD: i8 = 1i8 + i8::MAX; | ^^^^^^^^^^^^^ evaluation of `_NI8_ADD` failed here error[E0080]: attempt to compute `1_i8 + i8::MAX`, which would overflow - --> $DIR/overflowing-consts.rs:93:26 + --> $DIR/overflowing-consts.rs:92:26 | LL | const _NI8_ADD_P: &i8 = &(1i8 + i8::MAX); | ^^^^^^^^^^^^^^^ evaluation of `_NI8_ADD_P` failed here error[E0080]: attempt to compute `1_i16 + i16::MAX`, which would overflow - --> $DIR/overflowing-consts.rs:95:24 + --> $DIR/overflowing-consts.rs:94:24 | LL | const _NI16_ADD: i16 = 1i16 + i16::MAX; | ^^^^^^^^^^^^^^^ evaluation of `_NI16_ADD` failed here error[E0080]: attempt to compute `1_i16 + i16::MAX`, which would overflow - --> $DIR/overflowing-consts.rs:96:28 + --> $DIR/overflowing-consts.rs:95:28 | LL | const _NI16_ADD_P: &i16 = &(1i16 + i16::MAX); | ^^^^^^^^^^^^^^^^^ evaluation of `_NI16_ADD_P` failed here error[E0080]: attempt to compute `1_i32 + i32::MAX`, which would overflow - --> $DIR/overflowing-consts.rs:98:24 + --> $DIR/overflowing-consts.rs:97:24 | LL | const _NI32_ADD: i32 = 1i32 + i32::MAX; | ^^^^^^^^^^^^^^^ evaluation of `_NI32_ADD` failed here error[E0080]: attempt to compute `1_i32 + i32::MAX`, which would overflow - --> $DIR/overflowing-consts.rs:99:28 + --> $DIR/overflowing-consts.rs:98:28 | LL | const _NI32_ADD_P: &i32 = &(1i32 + i32::MAX); | ^^^^^^^^^^^^^^^^^ evaluation of `_NI32_ADD_P` failed here error[E0080]: attempt to compute `1_i64 + i64::MAX`, which would overflow - --> $DIR/overflowing-consts.rs:101:24 + --> $DIR/overflowing-consts.rs:100:24 | LL | const _NI64_ADD: i64 = 1i64 + i64::MAX; | ^^^^^^^^^^^^^^^ evaluation of `_NI64_ADD` failed here error[E0080]: attempt to compute `1_i64 + i64::MAX`, which would overflow - --> $DIR/overflowing-consts.rs:102:28 + --> $DIR/overflowing-consts.rs:101:28 | LL | const _NI64_ADD_P: &i64 = &(1i64 + i64::MAX); | ^^^^^^^^^^^^^^^^^ evaluation of `_NI64_ADD_P` failed here error[E0080]: attempt to compute `1_i128 + i128::MAX`, which would overflow - --> $DIR/overflowing-consts.rs:104:26 + --> $DIR/overflowing-consts.rs:103:26 | LL | const _NI128_ADD: i128 = 1i128 + i128::MAX; | ^^^^^^^^^^^^^^^^^ evaluation of `_NI128_ADD` failed here error[E0080]: attempt to compute `1_i128 + i128::MAX`, which would overflow - --> $DIR/overflowing-consts.rs:105:30 + --> $DIR/overflowing-consts.rs:104:30 | LL | const _NI128_ADD_P: &i128 = &(1i128 + i128::MAX); | ^^^^^^^^^^^^^^^^^^^ evaluation of `_NI128_ADD_P` failed here error[E0080]: attempt to compute `1_u8 + u8::MAX`, which would overflow - --> $DIR/overflowing-consts.rs:107:22 + --> $DIR/overflowing-consts.rs:106:22 | LL | const _NU8_ADD: u8 = 1u8 + u8::MAX; | ^^^^^^^^^^^^^ evaluation of `_NU8_ADD` failed here error[E0080]: attempt to compute `1_u8 + u8::MAX`, which would overflow - --> $DIR/overflowing-consts.rs:108:26 + --> $DIR/overflowing-consts.rs:107:26 | LL | const _NU8_ADD_P: &u8 = &(1u8 + u8::MAX); | ^^^^^^^^^^^^^^^ evaluation of `_NU8_ADD_P` failed here error[E0080]: attempt to compute `1_u16 + u16::MAX`, which would overflow - --> $DIR/overflowing-consts.rs:110:24 + --> $DIR/overflowing-consts.rs:109:24 | LL | const _NU16_ADD: u16 = 1u16 + u16::MAX; | ^^^^^^^^^^^^^^^ evaluation of `_NU16_ADD` failed here error[E0080]: attempt to compute `1_u16 + u16::MAX`, which would overflow - --> $DIR/overflowing-consts.rs:111:28 + --> $DIR/overflowing-consts.rs:110:28 | LL | const _NU16_ADD_P: &u16 = &(1u16 + u16::MAX); | ^^^^^^^^^^^^^^^^^ evaluation of `_NU16_ADD_P` failed here error[E0080]: attempt to compute `1_u32 + u32::MAX`, which would overflow - --> $DIR/overflowing-consts.rs:113:24 + --> $DIR/overflowing-consts.rs:112:24 | LL | const _NU32_ADD: u32 = 1u32 + u32::MAX; | ^^^^^^^^^^^^^^^ evaluation of `_NU32_ADD` failed here error[E0080]: attempt to compute `1_u32 + u32::MAX`, which would overflow - --> $DIR/overflowing-consts.rs:114:28 + --> $DIR/overflowing-consts.rs:113:28 | LL | const _NU32_ADD_P: &u32 = &(1u32 + u32::MAX); | ^^^^^^^^^^^^^^^^^ evaluation of `_NU32_ADD_P` failed here error[E0080]: attempt to compute `1_u64 + u64::MAX`, which would overflow - --> $DIR/overflowing-consts.rs:116:24 + --> $DIR/overflowing-consts.rs:115:24 | LL | const _NU64_ADD: u64 = 1u64 + u64::MAX; | ^^^^^^^^^^^^^^^ evaluation of `_NU64_ADD` failed here error[E0080]: attempt to compute `1_u64 + u64::MAX`, which would overflow - --> $DIR/overflowing-consts.rs:117:28 + --> $DIR/overflowing-consts.rs:116:28 | LL | const _NU64_ADD_P: &u64 = &(1u64 + u64::MAX); | ^^^^^^^^^^^^^^^^^ evaluation of `_NU64_ADD_P` failed here error[E0080]: attempt to compute `1_u128 + u128::MAX`, which would overflow - --> $DIR/overflowing-consts.rs:119:26 + --> $DIR/overflowing-consts.rs:118:26 | LL | const _NU128_ADD: u128 = 1u128 + u128::MAX; | ^^^^^^^^^^^^^^^^^ evaluation of `_NU128_ADD` failed here error[E0080]: attempt to compute `1_u128 + u128::MAX`, which would overflow - --> $DIR/overflowing-consts.rs:120:30 + --> $DIR/overflowing-consts.rs:119:30 | LL | const _NU128_ADD_P: &u128 = &(1u128 + u128::MAX); | ^^^^^^^^^^^^^^^^^^^ evaluation of `_NU128_ADD_P` failed here error[E0080]: attempt to compute `1_isize + isize::MAX`, which would overflow - --> $DIR/overflowing-consts.rs:122:28 + --> $DIR/overflowing-consts.rs:121:28 | LL | const _NISIZE_ADD: isize = 1isize + isize::MAX; | ^^^^^^^^^^^^^^^^^^^ evaluation of `_NISIZE_ADD` failed here error[E0080]: attempt to compute `1_isize + isize::MAX`, which would overflow - --> $DIR/overflowing-consts.rs:123:32 + --> $DIR/overflowing-consts.rs:122:32 | LL | const _NISIZE_ADD_P: &isize = &(1isize + isize::MAX); | ^^^^^^^^^^^^^^^^^^^^^ evaluation of `_NISIZE_ADD_P` failed here error[E0080]: attempt to compute `1_usize + usize::MAX`, which would overflow - --> $DIR/overflowing-consts.rs:125:28 + --> $DIR/overflowing-consts.rs:124:28 | LL | const _NUSIZE_ADD: usize = 1usize + usize::MAX; | ^^^^^^^^^^^^^^^^^^^ evaluation of `_NUSIZE_ADD` failed here error[E0080]: attempt to compute `1_usize + usize::MAX`, which would overflow - --> $DIR/overflowing-consts.rs:126:32 + --> $DIR/overflowing-consts.rs:125:32 | LL | const _NUSIZE_ADD_P: &usize = &(1usize + usize::MAX); | ^^^^^^^^^^^^^^^^^^^^^ evaluation of `_NUSIZE_ADD_P` failed here error[E0080]: attempt to compute `-5_i8 - i8::MAX`, which would overflow - --> $DIR/overflowing-consts.rs:129:22 + --> $DIR/overflowing-consts.rs:128:22 | LL | const _NI8_SUB: i8 = -5i8 - i8::MAX; | ^^^^^^^^^^^^^^ evaluation of `_NI8_SUB` failed here error[E0080]: attempt to compute `-5_i8 - i8::MAX`, which would overflow - --> $DIR/overflowing-consts.rs:130:26 + --> $DIR/overflowing-consts.rs:129:26 | LL | const _NI8_SUB_P: &i8 = &(-5i8 - i8::MAX); | ^^^^^^^^^^^^^^^^ evaluation of `_NI8_SUB_P` failed here error[E0080]: attempt to compute `-5_i16 - i16::MAX`, which would overflow - --> $DIR/overflowing-consts.rs:132:24 + --> $DIR/overflowing-consts.rs:131:24 | LL | const _NI16_SUB: i16 = -5i16 - i16::MAX; | ^^^^^^^^^^^^^^^^ evaluation of `_NI16_SUB` failed here error[E0080]: attempt to compute `-5_i16 - i16::MAX`, which would overflow - --> $DIR/overflowing-consts.rs:133:28 + --> $DIR/overflowing-consts.rs:132:28 | LL | const _NI16_SUB_P: &i16 = &(-5i16 - i16::MAX); | ^^^^^^^^^^^^^^^^^^ evaluation of `_NI16_SUB_P` failed here error[E0080]: attempt to compute `-5_i32 - i32::MAX`, which would overflow - --> $DIR/overflowing-consts.rs:135:24 + --> $DIR/overflowing-consts.rs:134:24 | LL | const _NI32_SUB: i32 = -5i32 - i32::MAX; | ^^^^^^^^^^^^^^^^ evaluation of `_NI32_SUB` failed here error[E0080]: attempt to compute `-5_i32 - i32::MAX`, which would overflow - --> $DIR/overflowing-consts.rs:136:28 + --> $DIR/overflowing-consts.rs:135:28 | LL | const _NI32_SUB_P: &i32 = &(-5i32 - i32::MAX); | ^^^^^^^^^^^^^^^^^^ evaluation of `_NI32_SUB_P` failed here error[E0080]: attempt to compute `-5_i64 - i64::MAX`, which would overflow - --> $DIR/overflowing-consts.rs:138:24 + --> $DIR/overflowing-consts.rs:137:24 | LL | const _NI64_SUB: i64 = -5i64 - i64::MAX; | ^^^^^^^^^^^^^^^^ evaluation of `_NI64_SUB` failed here error[E0080]: attempt to compute `-5_i64 - i64::MAX`, which would overflow - --> $DIR/overflowing-consts.rs:139:28 + --> $DIR/overflowing-consts.rs:138:28 | LL | const _NI64_SUB_P: &i64 = &(-5i64 - i64::MAX); | ^^^^^^^^^^^^^^^^^^ evaluation of `_NI64_SUB_P` failed here error[E0080]: attempt to compute `-5_i128 - i128::MAX`, which would overflow - --> $DIR/overflowing-consts.rs:141:26 + --> $DIR/overflowing-consts.rs:140:26 | LL | const _NI128_SUB: i128 = -5i128 - i128::MAX; | ^^^^^^^^^^^^^^^^^^ evaluation of `_NI128_SUB` failed here error[E0080]: attempt to compute `-5_i128 - i128::MAX`, which would overflow - --> $DIR/overflowing-consts.rs:142:30 + --> $DIR/overflowing-consts.rs:141:30 | LL | const _NI128_SUB_P: &i128 = &(-5i128 - i128::MAX); | ^^^^^^^^^^^^^^^^^^^^ evaluation of `_NI128_SUB_P` failed here error[E0080]: attempt to compute `1_u8 - 5_u8`, which would overflow - --> $DIR/overflowing-consts.rs:144:22 + --> $DIR/overflowing-consts.rs:143:22 | LL | const _NU8_SUB: u8 = 1u8 - 5; | ^^^^^^^ evaluation of `_NU8_SUB` failed here error[E0080]: attempt to compute `1_u8 - 5_u8`, which would overflow - --> $DIR/overflowing-consts.rs:145:26 + --> $DIR/overflowing-consts.rs:144:26 | LL | const _NU8_SUB_P: &u8 = &(1u8 - 5); | ^^^^^^^^^ evaluation of `_NU8_SUB_P` failed here error[E0080]: attempt to compute `1_u16 - 5_u16`, which would overflow - --> $DIR/overflowing-consts.rs:147:24 + --> $DIR/overflowing-consts.rs:146:24 | LL | const _NU16_SUB: u16 = 1u16 - 5; | ^^^^^^^^ evaluation of `_NU16_SUB` failed here error[E0080]: attempt to compute `1_u16 - 5_u16`, which would overflow - --> $DIR/overflowing-consts.rs:148:28 + --> $DIR/overflowing-consts.rs:147:28 | LL | const _NU16_SUB_P: &u16 = &(1u16 - 5); | ^^^^^^^^^^ evaluation of `_NU16_SUB_P` failed here error[E0080]: attempt to compute `1_u32 - 5_u32`, which would overflow - --> $DIR/overflowing-consts.rs:150:24 + --> $DIR/overflowing-consts.rs:149:24 | LL | const _NU32_SUB: u32 = 1u32 - 5; | ^^^^^^^^ evaluation of `_NU32_SUB` failed here error[E0080]: attempt to compute `1_u32 - 5_u32`, which would overflow - --> $DIR/overflowing-consts.rs:151:28 + --> $DIR/overflowing-consts.rs:150:28 | LL | const _NU32_SUB_P: &u32 = &(1u32 - 5); | ^^^^^^^^^^ evaluation of `_NU32_SUB_P` failed here error[E0080]: attempt to compute `1_u64 - 5_u64`, which would overflow - --> $DIR/overflowing-consts.rs:153:24 + --> $DIR/overflowing-consts.rs:152:24 | LL | const _NU64_SUB: u64 = 1u64 - 5; | ^^^^^^^^ evaluation of `_NU64_SUB` failed here error[E0080]: attempt to compute `1_u64 - 5_u64`, which would overflow - --> $DIR/overflowing-consts.rs:154:28 + --> $DIR/overflowing-consts.rs:153:28 | LL | const _NU64_SUB_P: &u64 = &(1u64 - 5); | ^^^^^^^^^^ evaluation of `_NU64_SUB_P` failed here error[E0080]: attempt to compute `1_u128 - 5_u128`, which would overflow - --> $DIR/overflowing-consts.rs:156:26 + --> $DIR/overflowing-consts.rs:155:26 | LL | const _NU128_SUB: u128 = 1u128 - 5; | ^^^^^^^^^ evaluation of `_NU128_SUB` failed here error[E0080]: attempt to compute `1_u128 - 5_u128`, which would overflow - --> $DIR/overflowing-consts.rs:157:30 + --> $DIR/overflowing-consts.rs:156:30 | LL | const _NU128_SUB_P: &u128 = &(1u128 - 5); | ^^^^^^^^^^^ evaluation of `_NU128_SUB_P` failed here error[E0080]: attempt to compute `-5_isize - isize::MAX`, which would overflow - --> $DIR/overflowing-consts.rs:159:28 + --> $DIR/overflowing-consts.rs:158:28 | LL | const _NISIZE_SUB: isize = -5isize - isize::MAX; | ^^^^^^^^^^^^^^^^^^^^ evaluation of `_NISIZE_SUB` failed here error[E0080]: attempt to compute `-5_isize - isize::MAX`, which would overflow - --> $DIR/overflowing-consts.rs:160:32 + --> $DIR/overflowing-consts.rs:159:32 | LL | const _NISIZE_SUB_P: &isize = &(-5isize - isize::MAX); | ^^^^^^^^^^^^^^^^^^^^^^ evaluation of `_NISIZE_SUB_P` failed here error[E0080]: attempt to compute `1_usize - 5_usize`, which would overflow - --> $DIR/overflowing-consts.rs:162:28 + --> $DIR/overflowing-consts.rs:161:28 | LL | const _NUSIZE_SUB: usize = 1usize - 5; | ^^^^^^^^^^ evaluation of `_NUSIZE_SUB` failed here error[E0080]: attempt to compute `1_usize - 5_usize`, which would overflow - --> $DIR/overflowing-consts.rs:163:32 + --> $DIR/overflowing-consts.rs:162:32 | LL | const _NUSIZE_SUB_P: &usize = &(1usize - 5); | ^^^^^^^^^^^^ evaluation of `_NUSIZE_SUB_P` failed here error[E0080]: attempt to compute `i8::MAX * 5_i8`, which would overflow - --> $DIR/overflowing-consts.rs:166:22 + --> $DIR/overflowing-consts.rs:165:22 | LL | const _NI8_MUL: i8 = i8::MAX * 5; | ^^^^^^^^^^^ evaluation of `_NI8_MUL` failed here error[E0080]: attempt to compute `i8::MAX * 5_i8`, which would overflow - --> $DIR/overflowing-consts.rs:167:26 + --> $DIR/overflowing-consts.rs:166:26 | LL | const _NI8_MUL_P: &i8 = &(i8::MAX * 5); | ^^^^^^^^^^^^^ evaluation of `_NI8_MUL_P` failed here error[E0080]: attempt to compute `i16::MAX * 5_i16`, which would overflow - --> $DIR/overflowing-consts.rs:169:24 + --> $DIR/overflowing-consts.rs:168:24 | LL | const _NI16_MUL: i16 = i16::MAX * 5; | ^^^^^^^^^^^^ evaluation of `_NI16_MUL` failed here error[E0080]: attempt to compute `i16::MAX * 5_i16`, which would overflow - --> $DIR/overflowing-consts.rs:170:28 + --> $DIR/overflowing-consts.rs:169:28 | LL | const _NI16_MUL_P: &i16 = &(i16::MAX * 5); | ^^^^^^^^^^^^^^ evaluation of `_NI16_MUL_P` failed here error[E0080]: attempt to compute `i32::MAX * 5_i32`, which would overflow - --> $DIR/overflowing-consts.rs:172:24 + --> $DIR/overflowing-consts.rs:171:24 | LL | const _NI32_MUL: i32 = i32::MAX * 5; | ^^^^^^^^^^^^ evaluation of `_NI32_MUL` failed here error[E0080]: attempt to compute `i32::MAX * 5_i32`, which would overflow - --> $DIR/overflowing-consts.rs:173:28 + --> $DIR/overflowing-consts.rs:172:28 | LL | const _NI32_MUL_P: &i32 = &(i32::MAX * 5); | ^^^^^^^^^^^^^^ evaluation of `_NI32_MUL_P` failed here error[E0080]: attempt to compute `i64::MAX * 5_i64`, which would overflow - --> $DIR/overflowing-consts.rs:175:24 + --> $DIR/overflowing-consts.rs:174:24 | LL | const _NI64_MUL: i64 = i64::MAX * 5; | ^^^^^^^^^^^^ evaluation of `_NI64_MUL` failed here error[E0080]: attempt to compute `i64::MAX * 5_i64`, which would overflow - --> $DIR/overflowing-consts.rs:176:28 + --> $DIR/overflowing-consts.rs:175:28 | LL | const _NI64_MUL_P: &i64 = &(i64::MAX * 5); | ^^^^^^^^^^^^^^ evaluation of `_NI64_MUL_P` failed here error[E0080]: attempt to compute `i128::MAX * 5_i128`, which would overflow - --> $DIR/overflowing-consts.rs:178:26 + --> $DIR/overflowing-consts.rs:177:26 | LL | const _NI128_MUL: i128 = i128::MAX * 5; | ^^^^^^^^^^^^^ evaluation of `_NI128_MUL` failed here error[E0080]: attempt to compute `i128::MAX * 5_i128`, which would overflow - --> $DIR/overflowing-consts.rs:179:30 + --> $DIR/overflowing-consts.rs:178:30 | LL | const _NI128_MUL_P: &i128 = &(i128::MAX * 5); | ^^^^^^^^^^^^^^^ evaluation of `_NI128_MUL_P` failed here error[E0080]: attempt to compute `u8::MAX * 5_u8`, which would overflow - --> $DIR/overflowing-consts.rs:181:22 + --> $DIR/overflowing-consts.rs:180:22 | LL | const _NU8_MUL: u8 = u8::MAX * 5; | ^^^^^^^^^^^ evaluation of `_NU8_MUL` failed here error[E0080]: attempt to compute `u8::MAX * 5_u8`, which would overflow - --> $DIR/overflowing-consts.rs:182:26 + --> $DIR/overflowing-consts.rs:181:26 | LL | const _NU8_MUL_P: &u8 = &(u8::MAX * 5); | ^^^^^^^^^^^^^ evaluation of `_NU8_MUL_P` failed here error[E0080]: attempt to compute `u16::MAX * 5_u16`, which would overflow - --> $DIR/overflowing-consts.rs:184:24 + --> $DIR/overflowing-consts.rs:183:24 | LL | const _NU16_MUL: u16 = u16::MAX * 5; | ^^^^^^^^^^^^ evaluation of `_NU16_MUL` failed here error[E0080]: attempt to compute `u16::MAX * 5_u16`, which would overflow - --> $DIR/overflowing-consts.rs:185:28 + --> $DIR/overflowing-consts.rs:184:28 | LL | const _NU16_MUL_P: &u16 = &(u16::MAX * 5); | ^^^^^^^^^^^^^^ evaluation of `_NU16_MUL_P` failed here error[E0080]: attempt to compute `u32::MAX * 5_u32`, which would overflow - --> $DIR/overflowing-consts.rs:187:24 + --> $DIR/overflowing-consts.rs:186:24 | LL | const _NU32_MUL: u32 = u32::MAX * 5; | ^^^^^^^^^^^^ evaluation of `_NU32_MUL` failed here error[E0080]: attempt to compute `u32::MAX * 5_u32`, which would overflow - --> $DIR/overflowing-consts.rs:188:28 + --> $DIR/overflowing-consts.rs:187:28 | LL | const _NU32_MUL_P: &u32 = &(u32::MAX * 5); | ^^^^^^^^^^^^^^ evaluation of `_NU32_MUL_P` failed here error[E0080]: attempt to compute `u64::MAX * 5_u64`, which would overflow - --> $DIR/overflowing-consts.rs:190:24 + --> $DIR/overflowing-consts.rs:189:24 | LL | const _NU64_MUL: u64 = u64::MAX * 5; | ^^^^^^^^^^^^ evaluation of `_NU64_MUL` failed here error[E0080]: attempt to compute `u64::MAX * 5_u64`, which would overflow - --> $DIR/overflowing-consts.rs:191:28 + --> $DIR/overflowing-consts.rs:190:28 | LL | const _NU64_MUL_P: &u64 = &(u64::MAX * 5); | ^^^^^^^^^^^^^^ evaluation of `_NU64_MUL_P` failed here error[E0080]: attempt to compute `u128::MAX * 5_u128`, which would overflow - --> $DIR/overflowing-consts.rs:193:26 + --> $DIR/overflowing-consts.rs:192:26 | LL | const _NU128_MUL: u128 = u128::MAX * 5; | ^^^^^^^^^^^^^ evaluation of `_NU128_MUL` failed here error[E0080]: attempt to compute `u128::MAX * 5_u128`, which would overflow - --> $DIR/overflowing-consts.rs:194:30 + --> $DIR/overflowing-consts.rs:193:30 | LL | const _NU128_MUL_P: &u128 = &(u128::MAX * 5); | ^^^^^^^^^^^^^^^ evaluation of `_NU128_MUL_P` failed here error[E0080]: attempt to compute `isize::MAX * 5_isize`, which would overflow - --> $DIR/overflowing-consts.rs:196:28 + --> $DIR/overflowing-consts.rs:195:28 | LL | const _NISIZE_MUL: isize = isize::MAX * 5; | ^^^^^^^^^^^^^^ evaluation of `_NISIZE_MUL` failed here error[E0080]: attempt to compute `isize::MAX * 5_isize`, which would overflow - --> $DIR/overflowing-consts.rs:197:32 + --> $DIR/overflowing-consts.rs:196:32 | LL | const _NISIZE_MUL_P: &isize = &(isize::MAX * 5); | ^^^^^^^^^^^^^^^^ evaluation of `_NISIZE_MUL_P` failed here error[E0080]: attempt to compute `usize::MAX * 5_usize`, which would overflow - --> $DIR/overflowing-consts.rs:199:28 + --> $DIR/overflowing-consts.rs:198:28 | LL | const _NUSIZE_MUL: usize = usize::MAX * 5; | ^^^^^^^^^^^^^^ evaluation of `_NUSIZE_MUL` failed here error[E0080]: attempt to compute `usize::MAX * 5_usize`, which would overflow - --> $DIR/overflowing-consts.rs:200:32 + --> $DIR/overflowing-consts.rs:199:32 | LL | const _NUSIZE_MUL_P: &usize = &(usize::MAX * 5); | ^^^^^^^^^^^^^^^^ evaluation of `_NUSIZE_MUL_P` failed here error[E0080]: attempt to divide `1_i8` by zero - --> $DIR/overflowing-consts.rs:203:22 + --> $DIR/overflowing-consts.rs:202:22 | LL | const _NI8_DIV: i8 = 1i8 / 0; | ^^^^^^^ evaluation of `_NI8_DIV` failed here error[E0080]: attempt to divide `1_i8` by zero - --> $DIR/overflowing-consts.rs:204:26 + --> $DIR/overflowing-consts.rs:203:26 | LL | const _NI8_DIV_P: &i8 = &(1i8 / 0); | ^^^^^^^^^ evaluation of `_NI8_DIV_P` failed here error[E0080]: attempt to divide `1_i16` by zero - --> $DIR/overflowing-consts.rs:206:24 + --> $DIR/overflowing-consts.rs:205:24 | LL | const _NI16_DIV: i16 = 1i16 / 0; | ^^^^^^^^ evaluation of `_NI16_DIV` failed here error[E0080]: attempt to divide `1_i16` by zero - --> $DIR/overflowing-consts.rs:207:28 + --> $DIR/overflowing-consts.rs:206:28 | LL | const _NI16_DIV_P: &i16 = &(1i16 / 0); | ^^^^^^^^^^ evaluation of `_NI16_DIV_P` failed here error[E0080]: attempt to divide `1_i32` by zero - --> $DIR/overflowing-consts.rs:209:24 + --> $DIR/overflowing-consts.rs:208:24 | LL | const _NI32_DIV: i32 = 1i32 / 0; | ^^^^^^^^ evaluation of `_NI32_DIV` failed here error[E0080]: attempt to divide `1_i32` by zero - --> $DIR/overflowing-consts.rs:210:28 + --> $DIR/overflowing-consts.rs:209:28 | LL | const _NI32_DIV_P: &i32 = &(1i32 / 0); | ^^^^^^^^^^ evaluation of `_NI32_DIV_P` failed here error[E0080]: attempt to divide `1_i64` by zero - --> $DIR/overflowing-consts.rs:212:24 + --> $DIR/overflowing-consts.rs:211:24 | LL | const _NI64_DIV: i64 = 1i64 / 0; | ^^^^^^^^ evaluation of `_NI64_DIV` failed here error[E0080]: attempt to divide `1_i64` by zero - --> $DIR/overflowing-consts.rs:213:28 + --> $DIR/overflowing-consts.rs:212:28 | LL | const _NI64_DIV_P: &i64 = &(1i64 / 0); | ^^^^^^^^^^ evaluation of `_NI64_DIV_P` failed here error[E0080]: attempt to divide `1_i128` by zero - --> $DIR/overflowing-consts.rs:215:26 + --> $DIR/overflowing-consts.rs:214:26 | LL | const _NI128_DIV: i128 = 1i128 / 0; | ^^^^^^^^^ evaluation of `_NI128_DIV` failed here error[E0080]: attempt to divide `1_i128` by zero - --> $DIR/overflowing-consts.rs:216:30 + --> $DIR/overflowing-consts.rs:215:30 | LL | const _NI128_DIV_P: &i128 = &(1i128 / 0); | ^^^^^^^^^^^ evaluation of `_NI128_DIV_P` failed here error[E0080]: attempt to divide `1_u8` by zero - --> $DIR/overflowing-consts.rs:218:22 + --> $DIR/overflowing-consts.rs:217:22 | LL | const _NU8_DIV: u8 = 1u8 / 0; | ^^^^^^^ evaluation of `_NU8_DIV` failed here error[E0080]: attempt to divide `1_u8` by zero - --> $DIR/overflowing-consts.rs:219:26 + --> $DIR/overflowing-consts.rs:218:26 | LL | const _NU8_DIV_P: &u8 = &(1u8 / 0); | ^^^^^^^^^ evaluation of `_NU8_DIV_P` failed here error[E0080]: attempt to divide `1_u16` by zero - --> $DIR/overflowing-consts.rs:221:24 + --> $DIR/overflowing-consts.rs:220:24 | LL | const _NU16_DIV: u16 = 1u16 / 0; | ^^^^^^^^ evaluation of `_NU16_DIV` failed here error[E0080]: attempt to divide `1_u16` by zero - --> $DIR/overflowing-consts.rs:222:28 + --> $DIR/overflowing-consts.rs:221:28 | LL | const _NU16_DIV_P: &u16 = &(1u16 / 0); | ^^^^^^^^^^ evaluation of `_NU16_DIV_P` failed here error[E0080]: attempt to divide `1_u32` by zero - --> $DIR/overflowing-consts.rs:224:24 + --> $DIR/overflowing-consts.rs:223:24 | LL | const _NU32_DIV: u32 = 1u32 / 0; | ^^^^^^^^ evaluation of `_NU32_DIV` failed here error[E0080]: attempt to divide `1_u32` by zero - --> $DIR/overflowing-consts.rs:225:28 + --> $DIR/overflowing-consts.rs:224:28 | LL | const _NU32_DIV_P: &u32 = &(1u32 / 0); | ^^^^^^^^^^ evaluation of `_NU32_DIV_P` failed here error[E0080]: attempt to divide `1_u64` by zero - --> $DIR/overflowing-consts.rs:227:24 + --> $DIR/overflowing-consts.rs:226:24 | LL | const _NU64_DIV: u64 = 1u64 / 0; | ^^^^^^^^ evaluation of `_NU64_DIV` failed here error[E0080]: attempt to divide `1_u64` by zero - --> $DIR/overflowing-consts.rs:228:28 + --> $DIR/overflowing-consts.rs:227:28 | LL | const _NU64_DIV_P: &u64 = &(1u64 / 0); | ^^^^^^^^^^ evaluation of `_NU64_DIV_P` failed here error[E0080]: attempt to divide `1_u128` by zero - --> $DIR/overflowing-consts.rs:230:26 + --> $DIR/overflowing-consts.rs:229:26 | LL | const _NU128_DIV: u128 = 1u128 / 0; | ^^^^^^^^^ evaluation of `_NU128_DIV` failed here error[E0080]: attempt to divide `1_u128` by zero - --> $DIR/overflowing-consts.rs:231:30 + --> $DIR/overflowing-consts.rs:230:30 | LL | const _NU128_DIV_P: &u128 = &(1u128 / 0); | ^^^^^^^^^^^ evaluation of `_NU128_DIV_P` failed here error[E0080]: attempt to divide `1_isize` by zero - --> $DIR/overflowing-consts.rs:233:28 + --> $DIR/overflowing-consts.rs:232:28 | LL | const _NISIZE_DIV: isize = 1isize / 0; | ^^^^^^^^^^ evaluation of `_NISIZE_DIV` failed here error[E0080]: attempt to divide `1_isize` by zero - --> $DIR/overflowing-consts.rs:234:32 + --> $DIR/overflowing-consts.rs:233:32 | LL | const _NISIZE_DIV_P: &isize = &(1isize / 0); | ^^^^^^^^^^^^ evaluation of `_NISIZE_DIV_P` failed here error[E0080]: attempt to divide `1_usize` by zero - --> $DIR/overflowing-consts.rs:236:28 + --> $DIR/overflowing-consts.rs:235:28 | LL | const _NUSIZE_DIV: usize = 1usize / 0; | ^^^^^^^^^^ evaluation of `_NUSIZE_DIV` failed here error[E0080]: attempt to divide `1_usize` by zero - --> $DIR/overflowing-consts.rs:237:32 + --> $DIR/overflowing-consts.rs:236:32 | LL | const _NUSIZE_DIV_P: &usize = &(1usize / 0); | ^^^^^^^^^^^^ evaluation of `_NUSIZE_DIV_P` failed here error[E0080]: attempt to calculate the remainder of `1_i8` with a divisor of zero - --> $DIR/overflowing-consts.rs:240:22 + --> $DIR/overflowing-consts.rs:239:22 | LL | const _NI8_MOD: i8 = 1i8 % 0; | ^^^^^^^ evaluation of `_NI8_MOD` failed here error[E0080]: attempt to calculate the remainder of `1_i8` with a divisor of zero - --> $DIR/overflowing-consts.rs:241:26 + --> $DIR/overflowing-consts.rs:240:26 | LL | const _NI8_MOD_P: &i8 = &(1i8 % 0); | ^^^^^^^^^ evaluation of `_NI8_MOD_P` failed here error[E0080]: attempt to calculate the remainder of `1_i16` with a divisor of zero - --> $DIR/overflowing-consts.rs:243:24 + --> $DIR/overflowing-consts.rs:242:24 | LL | const _NI16_MOD: i16 = 1i16 % 0; | ^^^^^^^^ evaluation of `_NI16_MOD` failed here error[E0080]: attempt to calculate the remainder of `1_i16` with a divisor of zero - --> $DIR/overflowing-consts.rs:244:28 + --> $DIR/overflowing-consts.rs:243:28 | LL | const _NI16_MOD_P: &i16 = &(1i16 % 0); | ^^^^^^^^^^ evaluation of `_NI16_MOD_P` failed here error[E0080]: attempt to calculate the remainder of `1_i32` with a divisor of zero - --> $DIR/overflowing-consts.rs:246:24 + --> $DIR/overflowing-consts.rs:245:24 | LL | const _NI32_MOD: i32 = 1i32 % 0; | ^^^^^^^^ evaluation of `_NI32_MOD` failed here error[E0080]: attempt to calculate the remainder of `1_i32` with a divisor of zero - --> $DIR/overflowing-consts.rs:247:28 + --> $DIR/overflowing-consts.rs:246:28 | LL | const _NI32_MOD_P: &i32 = &(1i32 % 0); | ^^^^^^^^^^ evaluation of `_NI32_MOD_P` failed here error[E0080]: attempt to calculate the remainder of `1_i64` with a divisor of zero - --> $DIR/overflowing-consts.rs:249:24 + --> $DIR/overflowing-consts.rs:248:24 | LL | const _NI64_MOD: i64 = 1i64 % 0; | ^^^^^^^^ evaluation of `_NI64_MOD` failed here error[E0080]: attempt to calculate the remainder of `1_i64` with a divisor of zero - --> $DIR/overflowing-consts.rs:250:28 + --> $DIR/overflowing-consts.rs:249:28 | LL | const _NI64_MOD_P: &i64 = &(1i64 % 0); | ^^^^^^^^^^ evaluation of `_NI64_MOD_P` failed here error[E0080]: attempt to calculate the remainder of `1_i128` with a divisor of zero - --> $DIR/overflowing-consts.rs:252:26 + --> $DIR/overflowing-consts.rs:251:26 | LL | const _NI128_MOD: i128 = 1i128 % 0; | ^^^^^^^^^ evaluation of `_NI128_MOD` failed here error[E0080]: attempt to calculate the remainder of `1_i128` with a divisor of zero - --> $DIR/overflowing-consts.rs:253:30 + --> $DIR/overflowing-consts.rs:252:30 | LL | const _NI128_MOD_P: &i128 = &(1i128 % 0); | ^^^^^^^^^^^ evaluation of `_NI128_MOD_P` failed here error[E0080]: attempt to calculate the remainder of `1_u8` with a divisor of zero - --> $DIR/overflowing-consts.rs:255:22 + --> $DIR/overflowing-consts.rs:254:22 | LL | const _NU8_MOD: u8 = 1u8 % 0; | ^^^^^^^ evaluation of `_NU8_MOD` failed here error[E0080]: attempt to calculate the remainder of `1_u8` with a divisor of zero - --> $DIR/overflowing-consts.rs:256:26 + --> $DIR/overflowing-consts.rs:255:26 | LL | const _NU8_MOD_P: &u8 = &(1u8 % 0); | ^^^^^^^^^ evaluation of `_NU8_MOD_P` failed here error[E0080]: attempt to calculate the remainder of `1_u16` with a divisor of zero - --> $DIR/overflowing-consts.rs:258:24 + --> $DIR/overflowing-consts.rs:257:24 | LL | const _NU16_MOD: u16 = 1u16 % 0; | ^^^^^^^^ evaluation of `_NU16_MOD` failed here error[E0080]: attempt to calculate the remainder of `1_u16` with a divisor of zero - --> $DIR/overflowing-consts.rs:259:28 + --> $DIR/overflowing-consts.rs:258:28 | LL | const _NU16_MOD_P: &u16 = &(1u16 % 0); | ^^^^^^^^^^ evaluation of `_NU16_MOD_P` failed here error[E0080]: attempt to calculate the remainder of `1_u32` with a divisor of zero - --> $DIR/overflowing-consts.rs:261:24 + --> $DIR/overflowing-consts.rs:260:24 | LL | const _NU32_MOD: u32 = 1u32 % 0; | ^^^^^^^^ evaluation of `_NU32_MOD` failed here error[E0080]: attempt to calculate the remainder of `1_u32` with a divisor of zero - --> $DIR/overflowing-consts.rs:262:28 + --> $DIR/overflowing-consts.rs:261:28 | LL | const _NU32_MOD_P: &u32 = &(1u32 % 0); | ^^^^^^^^^^ evaluation of `_NU32_MOD_P` failed here error[E0080]: attempt to calculate the remainder of `1_u64` with a divisor of zero - --> $DIR/overflowing-consts.rs:264:24 + --> $DIR/overflowing-consts.rs:263:24 | LL | const _NU64_MOD: u64 = 1u64 % 0; | ^^^^^^^^ evaluation of `_NU64_MOD` failed here error[E0080]: attempt to calculate the remainder of `1_u64` with a divisor of zero - --> $DIR/overflowing-consts.rs:265:28 + --> $DIR/overflowing-consts.rs:264:28 | LL | const _NU64_MOD_P: &u64 = &(1u64 % 0); | ^^^^^^^^^^ evaluation of `_NU64_MOD_P` failed here error[E0080]: attempt to calculate the remainder of `1_u128` with a divisor of zero - --> $DIR/overflowing-consts.rs:267:26 + --> $DIR/overflowing-consts.rs:266:26 | LL | const _NU128_MOD: u128 = 1u128 % 0; | ^^^^^^^^^ evaluation of `_NU128_MOD` failed here error[E0080]: attempt to calculate the remainder of `1_u128` with a divisor of zero - --> $DIR/overflowing-consts.rs:268:30 + --> $DIR/overflowing-consts.rs:267:30 | LL | const _NU128_MOD_P: &u128 = &(1u128 % 0); | ^^^^^^^^^^^ evaluation of `_NU128_MOD_P` failed here error[E0080]: attempt to calculate the remainder of `1_isize` with a divisor of zero - --> $DIR/overflowing-consts.rs:270:28 + --> $DIR/overflowing-consts.rs:269:28 | LL | const _NISIZE_MOD: isize = 1isize % 0; | ^^^^^^^^^^ evaluation of `_NISIZE_MOD` failed here error[E0080]: attempt to calculate the remainder of `1_isize` with a divisor of zero - --> $DIR/overflowing-consts.rs:271:32 + --> $DIR/overflowing-consts.rs:270:32 | LL | const _NISIZE_MOD_P: &isize = &(1isize % 0); | ^^^^^^^^^^^^ evaluation of `_NISIZE_MOD_P` failed here error[E0080]: attempt to calculate the remainder of `1_usize` with a divisor of zero - --> $DIR/overflowing-consts.rs:273:28 + --> $DIR/overflowing-consts.rs:272:28 | LL | const _NUSIZE_MOD: usize = 1usize % 0; | ^^^^^^^^^^ evaluation of `_NUSIZE_MOD` failed here error[E0080]: attempt to calculate the remainder of `1_usize` with a divisor of zero - --> $DIR/overflowing-consts.rs:274:32 + --> $DIR/overflowing-consts.rs:273:32 | LL | const _NUSIZE_MOD_P: &usize = &(1usize % 0); | ^^^^^^^^^^^^ evaluation of `_NUSIZE_MOD_P` failed here error[E0080]: index out of bounds: the length is 3 but the index is 4 - --> $DIR/overflowing-consts.rs:277:24 + --> $DIR/overflowing-consts.rs:276:24 | LL | const _NI32_OOB: i32 = [1, 2, 3][4]; | ^^^^^^^^^^^^ evaluation of `_NI32_OOB` failed here error[E0080]: index out of bounds: the length is 3 but the index is 4 - --> $DIR/overflowing-consts.rs:278:28 + --> $DIR/overflowing-consts.rs:277:28 | LL | const _NI32_OOB_P: &i32 = &([1, 2, 3][4]); | ^^^^^^^^^^^^^^ evaluation of `_NI32_OOB_P` failed here diff --git a/tests/ui/consts/overflowing-consts.rs b/tests/ui/consts/overflowing-consts.rs index 7c008573b87ac..f4781aee7aa66 100644 --- a/tests/ui/consts/overflowing-consts.rs +++ b/tests/ui/consts/overflowing-consts.rs @@ -5,7 +5,6 @@ //@ [noopt]compile-flags: -C opt-level=0 //@ [opt]compile-flags: -O //@ [opt_with_overflow_checks]compile-flags: -C overflow-checks=on -O -//@ ignore-pass (test tests codegen-time behaviour) //@ normalize-stderr: "shift left by `(64|32)_usize`, which" -> "shift left by `%BITS%`, which" //@ normalize-stderr: "shift right by `(64|32)_usize`, which" -> "shift right by `%BITS%`, which" diff --git a/tests/ui/explicit-tail-calls/callee_is_track_caller.rs b/tests/ui/explicit-tail-calls/callee_is_track_caller.rs index 1246a3801fc36..b5e1b97e9da8d 100644 --- a/tests/ui/explicit-tail-calls/callee_is_track_caller.rs +++ b/tests/ui/explicit-tail-calls/callee_is_track_caller.rs @@ -1,5 +1,5 @@ //@ run-pass -//@ ignore-pass +//@ no-pass-override (checks for a warning produced by codegen) //@ ignore-backends: gcc #![expect(incomplete_features)] #![feature(explicit_tail_calls)] diff --git a/tests/ui/explicit-tail-calls/callee_is_track_caller_polymorphic.rs b/tests/ui/explicit-tail-calls/callee_is_track_caller_polymorphic.rs index 51688897b4001..7623dd558251b 100644 --- a/tests/ui/explicit-tail-calls/callee_is_track_caller_polymorphic.rs +++ b/tests/ui/explicit-tail-calls/callee_is_track_caller_polymorphic.rs @@ -1,5 +1,5 @@ //@ run-pass -//@ ignore-pass +//@ no-pass-override (checks for a warning produced by codegen) //@ ignore-backends: gcc #![expect(incomplete_features)] #![feature(explicit_tail_calls)] diff --git a/tests/ui/json/json-multiple.rs b/tests/ui/json/json-multiple.rs index 8ad57939d5d16..db655cea49bf0 100644 --- a/tests/ui/json/json-multiple.rs +++ b/tests/ui/json/json-multiple.rs @@ -1,5 +1,5 @@ //@ build-pass -//@ ignore-pass (different metadata emitted in different modes) +//@ no-pass-override (different metadata emitted in different modes) //@ compile-flags: --json=diagnostic-short --json artifacts --error-format=json //@ normalize-stderr: "json-multiple\..+/libjson_multiple.rlib" -> "json-multiple/libjson_multiple.rlib" diff --git a/tests/ui/json/json-options.rs b/tests/ui/json/json-options.rs index a6654bfcac6fa..82f4666c23340 100644 --- a/tests/ui/json/json-options.rs +++ b/tests/ui/json/json-options.rs @@ -1,5 +1,5 @@ //@ build-pass -//@ ignore-pass (different metadata emitted in different modes) +//@ no-pass-override (different metadata emitted in different modes) //@ compile-flags: --json=diagnostic-short,artifacts --error-format=json //@ normalize-stderr: "json-options\..+/libjson_options.rlib" -> "json-options/libjson_options.rlib" diff --git a/tests/ui/lint/issue-117949.noopt.stderr b/tests/ui/lint/issue-117949.noopt.stderr index 607488e2a4af8..a12b2269f299a 100644 --- a/tests/ui/lint/issue-117949.noopt.stderr +++ b/tests/ui/lint/issue-117949.noopt.stderr @@ -1,5 +1,5 @@ error: this arithmetic operation will overflow - --> $DIR/issue-117949.rs:16:24 + --> $DIR/issue-117949.rs:14:24 | LL | format_args!("{}", 5 * i32::MAX); | ^^^^^^^^^^^^ attempt to compute `5_i32 * i32::MAX`, which would overflow @@ -7,31 +7,31 @@ LL | format_args!("{}", 5 * i32::MAX); = note: `#[deny(arithmetic_overflow)]` on by default error: this arithmetic operation will overflow - --> $DIR/issue-117949.rs:15:24 + --> $DIR/issue-117949.rs:13:24 | LL | format_args!("{}", -5 - i32::MAX); | ^^^^^^^^^^^^^ attempt to compute `-5_i32 - i32::MAX`, which would overflow error: this arithmetic operation will overflow - --> $DIR/issue-117949.rs:14:24 + --> $DIR/issue-117949.rs:12:24 | LL | format_args!("{}", 1 + i32::MAX); | ^^^^^^^^^^^^ attempt to compute `1_i32 + i32::MAX`, which would overflow error: this arithmetic operation will overflow - --> $DIR/issue-117949.rs:13:24 + --> $DIR/issue-117949.rs:11:24 | LL | format_args!("{}", 1 >> 32); | ^^^^^^^ attempt to shift right by `32_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/issue-117949.rs:12:24 + --> $DIR/issue-117949.rs:10:24 | LL | format_args!("{}", 1 << 32); | ^^^^^^^ attempt to shift left by `32_i32`, which would overflow error: this operation will panic at runtime - --> $DIR/issue-117949.rs:17:24 + --> $DIR/issue-117949.rs:15:24 | LL | format_args!("{}", 1 / 0); | ^^^^^ attempt to divide `1_i32` by zero @@ -39,13 +39,13 @@ LL | format_args!("{}", 1 / 0); = note: `#[deny(unconditional_panic)]` on by default error: this operation will panic at runtime - --> $DIR/issue-117949.rs:18:24 + --> $DIR/issue-117949.rs:16:24 | LL | format_args!("{}", 1 % 0); | ^^^^^ attempt to calculate the remainder of `1_i32` with a divisor of zero error: this operation will panic at runtime - --> $DIR/issue-117949.rs:19:24 + --> $DIR/issue-117949.rs:17:24 | LL | format_args!("{}", [1, 2, 3][4]); | ^^^^^^^^^^^^ index out of bounds: the length is 3 but the index is 4 diff --git a/tests/ui/lint/issue-117949.opt.stderr b/tests/ui/lint/issue-117949.opt.stderr index 607488e2a4af8..a12b2269f299a 100644 --- a/tests/ui/lint/issue-117949.opt.stderr +++ b/tests/ui/lint/issue-117949.opt.stderr @@ -1,5 +1,5 @@ error: this arithmetic operation will overflow - --> $DIR/issue-117949.rs:16:24 + --> $DIR/issue-117949.rs:14:24 | LL | format_args!("{}", 5 * i32::MAX); | ^^^^^^^^^^^^ attempt to compute `5_i32 * i32::MAX`, which would overflow @@ -7,31 +7,31 @@ LL | format_args!("{}", 5 * i32::MAX); = note: `#[deny(arithmetic_overflow)]` on by default error: this arithmetic operation will overflow - --> $DIR/issue-117949.rs:15:24 + --> $DIR/issue-117949.rs:13:24 | LL | format_args!("{}", -5 - i32::MAX); | ^^^^^^^^^^^^^ attempt to compute `-5_i32 - i32::MAX`, which would overflow error: this arithmetic operation will overflow - --> $DIR/issue-117949.rs:14:24 + --> $DIR/issue-117949.rs:12:24 | LL | format_args!("{}", 1 + i32::MAX); | ^^^^^^^^^^^^ attempt to compute `1_i32 + i32::MAX`, which would overflow error: this arithmetic operation will overflow - --> $DIR/issue-117949.rs:13:24 + --> $DIR/issue-117949.rs:11:24 | LL | format_args!("{}", 1 >> 32); | ^^^^^^^ attempt to shift right by `32_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/issue-117949.rs:12:24 + --> $DIR/issue-117949.rs:10:24 | LL | format_args!("{}", 1 << 32); | ^^^^^^^ attempt to shift left by `32_i32`, which would overflow error: this operation will panic at runtime - --> $DIR/issue-117949.rs:17:24 + --> $DIR/issue-117949.rs:15:24 | LL | format_args!("{}", 1 / 0); | ^^^^^ attempt to divide `1_i32` by zero @@ -39,13 +39,13 @@ LL | format_args!("{}", 1 / 0); = note: `#[deny(unconditional_panic)]` on by default error: this operation will panic at runtime - --> $DIR/issue-117949.rs:18:24 + --> $DIR/issue-117949.rs:16:24 | LL | format_args!("{}", 1 % 0); | ^^^^^ attempt to calculate the remainder of `1_i32` with a divisor of zero error: this operation will panic at runtime - --> $DIR/issue-117949.rs:19:24 + --> $DIR/issue-117949.rs:17:24 | LL | format_args!("{}", [1, 2, 3][4]); | ^^^^^^^^^^^^ index out of bounds: the length is 3 but the index is 4 diff --git a/tests/ui/lint/issue-117949.opt_with_overflow_checks.stderr b/tests/ui/lint/issue-117949.opt_with_overflow_checks.stderr index 607488e2a4af8..a12b2269f299a 100644 --- a/tests/ui/lint/issue-117949.opt_with_overflow_checks.stderr +++ b/tests/ui/lint/issue-117949.opt_with_overflow_checks.stderr @@ -1,5 +1,5 @@ error: this arithmetic operation will overflow - --> $DIR/issue-117949.rs:16:24 + --> $DIR/issue-117949.rs:14:24 | LL | format_args!("{}", 5 * i32::MAX); | ^^^^^^^^^^^^ attempt to compute `5_i32 * i32::MAX`, which would overflow @@ -7,31 +7,31 @@ LL | format_args!("{}", 5 * i32::MAX); = note: `#[deny(arithmetic_overflow)]` on by default error: this arithmetic operation will overflow - --> $DIR/issue-117949.rs:15:24 + --> $DIR/issue-117949.rs:13:24 | LL | format_args!("{}", -5 - i32::MAX); | ^^^^^^^^^^^^^ attempt to compute `-5_i32 - i32::MAX`, which would overflow error: this arithmetic operation will overflow - --> $DIR/issue-117949.rs:14:24 + --> $DIR/issue-117949.rs:12:24 | LL | format_args!("{}", 1 + i32::MAX); | ^^^^^^^^^^^^ attempt to compute `1_i32 + i32::MAX`, which would overflow error: this arithmetic operation will overflow - --> $DIR/issue-117949.rs:13:24 + --> $DIR/issue-117949.rs:11:24 | LL | format_args!("{}", 1 >> 32); | ^^^^^^^ attempt to shift right by `32_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/issue-117949.rs:12:24 + --> $DIR/issue-117949.rs:10:24 | LL | format_args!("{}", 1 << 32); | ^^^^^^^ attempt to shift left by `32_i32`, which would overflow error: this operation will panic at runtime - --> $DIR/issue-117949.rs:17:24 + --> $DIR/issue-117949.rs:15:24 | LL | format_args!("{}", 1 / 0); | ^^^^^ attempt to divide `1_i32` by zero @@ -39,13 +39,13 @@ LL | format_args!("{}", 1 / 0); = note: `#[deny(unconditional_panic)]` on by default error: this operation will panic at runtime - --> $DIR/issue-117949.rs:18:24 + --> $DIR/issue-117949.rs:16:24 | LL | format_args!("{}", 1 % 0); | ^^^^^ attempt to calculate the remainder of `1_i32` with a divisor of zero error: this operation will panic at runtime - --> $DIR/issue-117949.rs:19:24 + --> $DIR/issue-117949.rs:17:24 | LL | format_args!("{}", [1, 2, 3][4]); | ^^^^^^^^^^^^ index out of bounds: the length is 3 but the index is 4 diff --git a/tests/ui/lint/issue-117949.rs b/tests/ui/lint/issue-117949.rs index 5673227f35d39..67d7094722b90 100644 --- a/tests/ui/lint/issue-117949.rs +++ b/tests/ui/lint/issue-117949.rs @@ -5,8 +5,6 @@ //@ [opt]compile-flags: -O //@ [opt_with_overflow_checks]compile-flags: -C overflow-checks=on -O -Z deduplicate-diagnostics=yes //@ build-fail -//@ ignore-pass (test tests codegen-time behaviour) - fn main() { format_args!("{}", 1 << 32); //~ ERROR: arithmetic operation will overflow diff --git a/tests/ui/lint/lint-overflowing-ops.noopt.stderr b/tests/ui/lint/lint-overflowing-ops.noopt.stderr index 1b7b73cec38d5..6c34405c5efd0 100644 --- a/tests/ui/lint/lint-overflowing-ops.noopt.stderr +++ b/tests/ui/lint/lint-overflowing-ops.noopt.stderr @@ -1,785 +1,785 @@ error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:28:14 + --> $DIR/lint-overflowing-ops.rs:27:14 | LL | let _n = 1u8 << 8; | ^^^^^^^^ attempt to shift left by `8_i32`, which would overflow | note: the lint level is defined here - --> $DIR/lint-overflowing-ops.rs:17:9 + --> $DIR/lint-overflowing-ops.rs:16:9 | LL | #![deny(arithmetic_overflow)] | ^^^^^^^^^^^^^^^^^^^ error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:226:15 + --> $DIR/lint-overflowing-ops.rs:225:15 | LL | let _n = &(isize::MAX * 5); | ^^^^^^^^^^^^^^^^ attempt to compute `isize::MAX * 5_isize`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:223:15 + --> $DIR/lint-overflowing-ops.rs:222:15 | LL | let _n = &(i128::MAX * 5); | ^^^^^^^^^^^^^^^ attempt to compute `i128::MAX * 5_i128`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:220:15 + --> $DIR/lint-overflowing-ops.rs:219:15 | LL | let _n = &(i64::MAX * 5); | ^^^^^^^^^^^^^^ attempt to compute `i64::MAX * 5_i64`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:217:15 + --> $DIR/lint-overflowing-ops.rs:216:15 | LL | let _n = &(i32::MAX * 5); | ^^^^^^^^^^^^^^ attempt to compute `i32::MAX * 5_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:214:15 + --> $DIR/lint-overflowing-ops.rs:213:15 | LL | let _n = &(i16::MAX * 5); | ^^^^^^^^^^^^^^ attempt to compute `i16::MAX * 5_i16`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:211:15 + --> $DIR/lint-overflowing-ops.rs:210:15 | LL | let _n = &(i8::MAX * i8::MAX); | ^^^^^^^^^^^^^^^^^^^ attempt to compute `i8::MAX * i8::MAX`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:208:15 + --> $DIR/lint-overflowing-ops.rs:207:15 | LL | let _n = &(usize::MAX * 5); | ^^^^^^^^^^^^^^^^ attempt to compute `usize::MAX * 5_usize`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:205:15 + --> $DIR/lint-overflowing-ops.rs:204:15 | LL | let _n = &(u128::MAX * 5); | ^^^^^^^^^^^^^^^ attempt to compute `u128::MAX * 5_u128`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:202:15 + --> $DIR/lint-overflowing-ops.rs:201:15 | LL | let _n = &(u64::MAX * 5); | ^^^^^^^^^^^^^^ attempt to compute `u64::MAX * 5_u64`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:199:15 + --> $DIR/lint-overflowing-ops.rs:198:15 | LL | let _n = &(u32::MAX * 5); | ^^^^^^^^^^^^^^ attempt to compute `u32::MAX * 5_u32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:196:15 + --> $DIR/lint-overflowing-ops.rs:195:15 | LL | let _n = &(u16::MAX * 5); | ^^^^^^^^^^^^^^ attempt to compute `u16::MAX * 5_u16`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:193:15 + --> $DIR/lint-overflowing-ops.rs:192:15 | LL | let _n = &(u8::MAX * 5); | ^^^^^^^^^^^^^ attempt to compute `u8::MAX * 5_u8`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:188:15 + --> $DIR/lint-overflowing-ops.rs:187:15 | LL | let _n = &(-i8::MIN); | ^^^^^^^^^^ attempt to negate `i8::MIN`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:185:15 + --> $DIR/lint-overflowing-ops.rs:184:15 | LL | let _n = &(1usize - 5); | ^^^^^^^^^^^^ attempt to compute `1_usize - 5_usize`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:182:15 + --> $DIR/lint-overflowing-ops.rs:181:15 | LL | let _n = &(-5isize - isize::MAX); | ^^^^^^^^^^^^^^^^^^^^^^ attempt to compute `-5_isize - isize::MAX`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:179:15 + --> $DIR/lint-overflowing-ops.rs:178:15 | LL | let _n = &(-5i128 - i128::MAX); | ^^^^^^^^^^^^^^^^^^^^ attempt to compute `-5_i128 - i128::MAX`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:176:15 + --> $DIR/lint-overflowing-ops.rs:175:15 | LL | let _n = &(-5i64 - i64::MAX); | ^^^^^^^^^^^^^^^^^^ attempt to compute `-5_i64 - i64::MAX`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:173:15 + --> $DIR/lint-overflowing-ops.rs:172:15 | LL | let _n = &(-5i32 - i32::MAX); | ^^^^^^^^^^^^^^^^^^ attempt to compute `-5_i32 - i32::MAX`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:170:15 + --> $DIR/lint-overflowing-ops.rs:169:15 | LL | let _n = &(-5i16 - i16::MAX); | ^^^^^^^^^^^^^^^^^^ attempt to compute `-5_i16 - i16::MAX`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:167:15 + --> $DIR/lint-overflowing-ops.rs:166:15 | LL | let _n = &(-5i8 - i8::MAX); | ^^^^^^^^^^^^^^^^ attempt to compute `-5_i8 - i8::MAX`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:164:15 + --> $DIR/lint-overflowing-ops.rs:163:15 | LL | let _n = &(1u128 - 5); | ^^^^^^^^^^^ attempt to compute `1_u128 - 5_u128`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:161:15 + --> $DIR/lint-overflowing-ops.rs:160:15 | LL | let _n = &(1u64 - 5); | ^^^^^^^^^^ attempt to compute `1_u64 - 5_u64`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:158:15 + --> $DIR/lint-overflowing-ops.rs:157:15 | LL | let _n = &(1u32 - 5); | ^^^^^^^^^^ attempt to compute `1_u32 - 5_u32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:155:15 + --> $DIR/lint-overflowing-ops.rs:154:15 | LL | let _n = &(1u16 - 5); | ^^^^^^^^^^ attempt to compute `1_u16 - 5_u16`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:152:15 + --> $DIR/lint-overflowing-ops.rs:151:15 | LL | let _n = &(1u8 - 5); | ^^^^^^^^^ attempt to compute `1_u8 - 5_u8`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:147:15 + --> $DIR/lint-overflowing-ops.rs:146:15 | LL | let _n = &(1usize + usize::MAX); | ^^^^^^^^^^^^^^^^^^^^^ attempt to compute `1_usize + usize::MAX`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:144:15 + --> $DIR/lint-overflowing-ops.rs:143:15 | LL | let _n = &(1isize + isize::MAX); | ^^^^^^^^^^^^^^^^^^^^^ attempt to compute `1_isize + isize::MAX`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:141:15 + --> $DIR/lint-overflowing-ops.rs:140:15 | LL | let _n = &(1i128 + i128::MAX); | ^^^^^^^^^^^^^^^^^^^ attempt to compute `1_i128 + i128::MAX`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:138:15 + --> $DIR/lint-overflowing-ops.rs:137:15 | LL | let _n = &(1i64 + i64::MAX); | ^^^^^^^^^^^^^^^^^ attempt to compute `1_i64 + i64::MAX`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:135:15 + --> $DIR/lint-overflowing-ops.rs:134:15 | LL | let _n = &(1i32 + i32::MAX); | ^^^^^^^^^^^^^^^^^ attempt to compute `1_i32 + i32::MAX`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:132:15 + --> $DIR/lint-overflowing-ops.rs:131:15 | LL | let _n = &(1i16 + i16::MAX); | ^^^^^^^^^^^^^^^^^ attempt to compute `1_i16 + i16::MAX`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:129:15 + --> $DIR/lint-overflowing-ops.rs:128:15 | LL | let _n = &(1i8 + i8::MAX); | ^^^^^^^^^^^^^^^ attempt to compute `1_i8 + i8::MAX`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:126:15 + --> $DIR/lint-overflowing-ops.rs:125:15 | LL | let _n = &(1u128 + u128::MAX); | ^^^^^^^^^^^^^^^^^^^ attempt to compute `1_u128 + u128::MAX`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:123:15 + --> $DIR/lint-overflowing-ops.rs:122:15 | LL | let _n = &(1u64 + u64::MAX); | ^^^^^^^^^^^^^^^^^ attempt to compute `1_u64 + u64::MAX`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:120:15 + --> $DIR/lint-overflowing-ops.rs:119:15 | LL | let _n = &(1u32 + u32::MAX); | ^^^^^^^^^^^^^^^^^ attempt to compute `1_u32 + u32::MAX`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:117:15 + --> $DIR/lint-overflowing-ops.rs:116:15 | LL | let _n = &(1u16 + u16::MAX); | ^^^^^^^^^^^^^^^^^ attempt to compute `1_u16 + u16::MAX`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:114:15 + --> $DIR/lint-overflowing-ops.rs:113:15 | LL | let _n = &(1u8 + u8::MAX); | ^^^^^^^^^^^^^^^ attempt to compute `1_u8 + u8::MAX`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:110:15 + --> $DIR/lint-overflowing-ops.rs:109:15 | LL | let _n = &(1i64 >> [64][0]); | ^^^^^^^^^^^^^^^^^ attempt to shift right by `64_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:107:15 + --> $DIR/lint-overflowing-ops.rs:106:15 | LL | let _n = &(1_usize >> BITS); | ^^^^^^^^^^^^^^^^^ attempt to shift right by `%BITS%`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:104:15 + --> $DIR/lint-overflowing-ops.rs:103:15 | LL | let _n = &(1_isize >> BITS); | ^^^^^^^^^^^^^^^^^ attempt to shift right by `%BITS%`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:101:15 + --> $DIR/lint-overflowing-ops.rs:100:15 | LL | let _n = &(1i128 >> 128); | ^^^^^^^^^^^^^^ attempt to shift right by `128_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:98:15 + --> $DIR/lint-overflowing-ops.rs:97:15 | LL | let _n = &(1i64 >> 64); | ^^^^^^^^^^^^ attempt to shift right by `64_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:95:15 + --> $DIR/lint-overflowing-ops.rs:94:15 | LL | let _n = &(1i32 >> 32); | ^^^^^^^^^^^^ attempt to shift right by `32_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:92:15 + --> $DIR/lint-overflowing-ops.rs:91:15 | LL | let _n = &(1i16 >> 16); | ^^^^^^^^^^^^ attempt to shift right by `16_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:89:15 + --> $DIR/lint-overflowing-ops.rs:88:15 | LL | let _n = &(1i8 >> 8); | ^^^^^^^^^^ attempt to shift right by `8_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:86:15 + --> $DIR/lint-overflowing-ops.rs:85:15 | LL | let _n = &(1u128 >> 128); | ^^^^^^^^^^^^^^ attempt to shift right by `128_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:83:15 + --> $DIR/lint-overflowing-ops.rs:82:15 | LL | let _n = &(1u64 >> 64); | ^^^^^^^^^^^^ attempt to shift right by `64_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:80:15 + --> $DIR/lint-overflowing-ops.rs:79:15 | LL | let _n = &(1u32 >> 32); | ^^^^^^^^^^^^ attempt to shift right by `32_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:77:15 + --> $DIR/lint-overflowing-ops.rs:76:15 | LL | let _n = &(1u16 >> 16); | ^^^^^^^^^^^^ attempt to shift right by `16_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:74:15 + --> $DIR/lint-overflowing-ops.rs:73:15 | LL | let _n = &(1u8 >> 8); | ^^^^^^^^^^ attempt to shift right by `8_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:65:15 + --> $DIR/lint-overflowing-ops.rs:64:15 | LL | let _n = &(1 << -1); | ^^^^^^^^^ attempt to shift left by `-1_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:62:15 + --> $DIR/lint-overflowing-ops.rs:61:15 | LL | let _n = &(1_usize << BITS); | ^^^^^^^^^^^^^^^^^ attempt to shift left by `%BITS%`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:59:15 + --> $DIR/lint-overflowing-ops.rs:58:15 | LL | let _n = &(1_isize << BITS); | ^^^^^^^^^^^^^^^^^ attempt to shift left by `%BITS%`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:56:15 + --> $DIR/lint-overflowing-ops.rs:55:15 | LL | let _n = &(1i128 << 128); | ^^^^^^^^^^^^^^ attempt to shift left by `128_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:53:15 + --> $DIR/lint-overflowing-ops.rs:52:15 | LL | let _n = &(1i64 << 64); | ^^^^^^^^^^^^ attempt to shift left by `64_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:50:15 + --> $DIR/lint-overflowing-ops.rs:49:15 | LL | let _n = &(1i32 << 32); | ^^^^^^^^^^^^ attempt to shift left by `32_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:47:15 + --> $DIR/lint-overflowing-ops.rs:46:15 | LL | let _n = &(1i16 << 16); | ^^^^^^^^^^^^ attempt to shift left by `16_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:44:15 + --> $DIR/lint-overflowing-ops.rs:43:15 | LL | let _n = &(1i8 << 8); | ^^^^^^^^^^ attempt to shift left by `8_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:41:15 + --> $DIR/lint-overflowing-ops.rs:40:15 | LL | let _n = &(1u128 << 128); | ^^^^^^^^^^^^^^ attempt to shift left by `128_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:38:15 + --> $DIR/lint-overflowing-ops.rs:37:15 | LL | let _n = &(1u64 << 64); | ^^^^^^^^^^^^ attempt to shift left by `64_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:35:15 + --> $DIR/lint-overflowing-ops.rs:34:15 | LL | let _n = &(1u32 << 32); | ^^^^^^^^^^^^ attempt to shift left by `32_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:32:15 + --> $DIR/lint-overflowing-ops.rs:31:15 | LL | let _n = &(1u16 << 16); | ^^^^^^^^^^^^ attempt to shift left by `16_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:29:15 + --> $DIR/lint-overflowing-ops.rs:28:15 | LL | let _n = &(1u8 << 8); | ^^^^^^^^^^ attempt to shift left by `8_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:31:14 + --> $DIR/lint-overflowing-ops.rs:30:14 | LL | let _n = 1u16 << 16; | ^^^^^^^^^^ attempt to shift left by `16_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:34:14 + --> $DIR/lint-overflowing-ops.rs:33:14 | LL | let _n = 1u32 << 32; | ^^^^^^^^^^ attempt to shift left by `32_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:37:14 + --> $DIR/lint-overflowing-ops.rs:36:14 | LL | let _n = 1u64 << 64; | ^^^^^^^^^^ attempt to shift left by `64_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:40:14 + --> $DIR/lint-overflowing-ops.rs:39:14 | LL | let _n = 1u128 << 128; | ^^^^^^^^^^^^ attempt to shift left by `128_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:43:14 + --> $DIR/lint-overflowing-ops.rs:42:14 | LL | let _n = 1i8 << 8; | ^^^^^^^^ attempt to shift left by `8_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:46:14 + --> $DIR/lint-overflowing-ops.rs:45:14 | LL | let _n = 1i16 << 16; | ^^^^^^^^^^ attempt to shift left by `16_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:49:14 + --> $DIR/lint-overflowing-ops.rs:48:14 | LL | let _n = 1i32 << 32; | ^^^^^^^^^^ attempt to shift left by `32_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:52:14 + --> $DIR/lint-overflowing-ops.rs:51:14 | LL | let _n = 1i64 << 64; | ^^^^^^^^^^ attempt to shift left by `64_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:55:14 + --> $DIR/lint-overflowing-ops.rs:54:14 | LL | let _n = 1i128 << 128; | ^^^^^^^^^^^^ attempt to shift left by `128_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:58:14 + --> $DIR/lint-overflowing-ops.rs:57:14 | LL | let _n = 1_isize << BITS; | ^^^^^^^^^^^^^^^ attempt to shift left by `%BITS%`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:61:14 + --> $DIR/lint-overflowing-ops.rs:60:14 | LL | let _n = 1_usize << BITS; | ^^^^^^^^^^^^^^^ attempt to shift left by `%BITS%`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:64:14 + --> $DIR/lint-overflowing-ops.rs:63:14 | LL | let _n = 1 << -1; | ^^^^^^^ attempt to shift left by `-1_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:69:14 + --> $DIR/lint-overflowing-ops.rs:68:14 | LL | let _n = -1_i64 >> 64; | ^^^^^^^^^^^^ attempt to shift right by `64_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:70:14 + --> $DIR/lint-overflowing-ops.rs:69:14 | LL | let _n = -1_i32 >> 32; | ^^^^^^^^^^^^ attempt to shift right by `32_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:71:14 + --> $DIR/lint-overflowing-ops.rs:70:14 | LL | let _n = -1_i32 >> -1; | ^^^^^^^^^^^^ attempt to shift right by `-1_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:73:14 + --> $DIR/lint-overflowing-ops.rs:72:14 | LL | let _n = 1u8 >> 8; | ^^^^^^^^ attempt to shift right by `8_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:76:14 + --> $DIR/lint-overflowing-ops.rs:75:14 | LL | let _n = 1u16 >> 16; | ^^^^^^^^^^ attempt to shift right by `16_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:79:14 + --> $DIR/lint-overflowing-ops.rs:78:14 | LL | let _n = 1u32 >> 32; | ^^^^^^^^^^ attempt to shift right by `32_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:82:14 + --> $DIR/lint-overflowing-ops.rs:81:14 | LL | let _n = 1u64 >> 64; | ^^^^^^^^^^ attempt to shift right by `64_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:85:14 + --> $DIR/lint-overflowing-ops.rs:84:14 | LL | let _n = 1u128 >> 128; | ^^^^^^^^^^^^ attempt to shift right by `128_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:88:14 + --> $DIR/lint-overflowing-ops.rs:87:14 | LL | let _n = 1i8 >> 8; | ^^^^^^^^ attempt to shift right by `8_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:91:14 + --> $DIR/lint-overflowing-ops.rs:90:14 | LL | let _n = 1i16 >> 16; | ^^^^^^^^^^ attempt to shift right by `16_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:94:14 + --> $DIR/lint-overflowing-ops.rs:93:14 | LL | let _n = 1i32 >> 32; | ^^^^^^^^^^ attempt to shift right by `32_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:97:14 + --> $DIR/lint-overflowing-ops.rs:96:14 | LL | let _n = 1i64 >> 64; | ^^^^^^^^^^ attempt to shift right by `64_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:100:14 + --> $DIR/lint-overflowing-ops.rs:99:14 | LL | let _n = 1i128 >> 128; | ^^^^^^^^^^^^ attempt to shift right by `128_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:103:14 + --> $DIR/lint-overflowing-ops.rs:102:14 | LL | let _n = 1_isize >> BITS; | ^^^^^^^^^^^^^^^ attempt to shift right by `%BITS%`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:106:14 + --> $DIR/lint-overflowing-ops.rs:105:14 | LL | let _n = 1_usize >> BITS; | ^^^^^^^^^^^^^^^ attempt to shift right by `%BITS%`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:109:14 + --> $DIR/lint-overflowing-ops.rs:108:14 | LL | let _n = 1i64 >> [64][0]; | ^^^^^^^^^^^^^^^ attempt to shift right by `64_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:113:14 + --> $DIR/lint-overflowing-ops.rs:112:14 | LL | let _n = 1u8 + u8::MAX; | ^^^^^^^^^^^^^ attempt to compute `1_u8 + u8::MAX`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:116:14 + --> $DIR/lint-overflowing-ops.rs:115:14 | LL | let _n = 1u16 + u16::MAX; | ^^^^^^^^^^^^^^^ attempt to compute `1_u16 + u16::MAX`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:119:14 + --> $DIR/lint-overflowing-ops.rs:118:14 | LL | let _n = 1u32 + u32::MAX; | ^^^^^^^^^^^^^^^ attempt to compute `1_u32 + u32::MAX`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:122:14 + --> $DIR/lint-overflowing-ops.rs:121:14 | LL | let _n = 1u64 + u64::MAX; | ^^^^^^^^^^^^^^^ attempt to compute `1_u64 + u64::MAX`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:125:14 + --> $DIR/lint-overflowing-ops.rs:124:14 | LL | let _n = 1u128 + u128::MAX; | ^^^^^^^^^^^^^^^^^ attempt to compute `1_u128 + u128::MAX`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:128:14 + --> $DIR/lint-overflowing-ops.rs:127:14 | LL | let _n = 1i8 + i8::MAX; | ^^^^^^^^^^^^^ attempt to compute `1_i8 + i8::MAX`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:131:14 + --> $DIR/lint-overflowing-ops.rs:130:14 | LL | let _n = 1i16 + i16::MAX; | ^^^^^^^^^^^^^^^ attempt to compute `1_i16 + i16::MAX`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:134:14 + --> $DIR/lint-overflowing-ops.rs:133:14 | LL | let _n = 1i32 + i32::MAX; | ^^^^^^^^^^^^^^^ attempt to compute `1_i32 + i32::MAX`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:137:14 + --> $DIR/lint-overflowing-ops.rs:136:14 | LL | let _n = 1i64 + i64::MAX; | ^^^^^^^^^^^^^^^ attempt to compute `1_i64 + i64::MAX`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:140:14 + --> $DIR/lint-overflowing-ops.rs:139:14 | LL | let _n = 1i128 + i128::MAX; | ^^^^^^^^^^^^^^^^^ attempt to compute `1_i128 + i128::MAX`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:143:14 + --> $DIR/lint-overflowing-ops.rs:142:14 | LL | let _n = 1isize + isize::MAX; | ^^^^^^^^^^^^^^^^^^^ attempt to compute `1_isize + isize::MAX`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:146:14 + --> $DIR/lint-overflowing-ops.rs:145:14 | LL | let _n = 1usize + usize::MAX; | ^^^^^^^^^^^^^^^^^^^ attempt to compute `1_usize + usize::MAX`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:151:14 + --> $DIR/lint-overflowing-ops.rs:150:14 | LL | let _n = 1u8 - 5; | ^^^^^^^ attempt to compute `1_u8 - 5_u8`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:154:14 + --> $DIR/lint-overflowing-ops.rs:153:14 | LL | let _n = 1u16 - 5; | ^^^^^^^^ attempt to compute `1_u16 - 5_u16`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:157:14 + --> $DIR/lint-overflowing-ops.rs:156:14 | LL | let _n = 1u32 - 5; | ^^^^^^^^ attempt to compute `1_u32 - 5_u32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:160:14 + --> $DIR/lint-overflowing-ops.rs:159:14 | LL | let _n = 1u64 - 5 ; | ^^^^^^^^ attempt to compute `1_u64 - 5_u64`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:163:14 + --> $DIR/lint-overflowing-ops.rs:162:14 | LL | let _n = 1u128 - 5 ; | ^^^^^^^^^ attempt to compute `1_u128 - 5_u128`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:166:14 + --> $DIR/lint-overflowing-ops.rs:165:14 | LL | let _n = -5i8 - i8::MAX; | ^^^^^^^^^^^^^^ attempt to compute `-5_i8 - i8::MAX`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:169:14 + --> $DIR/lint-overflowing-ops.rs:168:14 | LL | let _n = -5i16 - i16::MAX; | ^^^^^^^^^^^^^^^^ attempt to compute `-5_i16 - i16::MAX`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:172:14 + --> $DIR/lint-overflowing-ops.rs:171:14 | LL | let _n = -5i32 - i32::MAX; | ^^^^^^^^^^^^^^^^ attempt to compute `-5_i32 - i32::MAX`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:175:14 + --> $DIR/lint-overflowing-ops.rs:174:14 | LL | let _n = -5i64 - i64::MAX; | ^^^^^^^^^^^^^^^^ attempt to compute `-5_i64 - i64::MAX`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:178:14 + --> $DIR/lint-overflowing-ops.rs:177:14 | LL | let _n = -5i128 - i128::MAX; | ^^^^^^^^^^^^^^^^^^ attempt to compute `-5_i128 - i128::MAX`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:181:14 + --> $DIR/lint-overflowing-ops.rs:180:14 | LL | let _n = -5isize - isize::MAX; | ^^^^^^^^^^^^^^^^^^^^ attempt to compute `-5_isize - isize::MAX`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:184:14 + --> $DIR/lint-overflowing-ops.rs:183:14 | LL | let _n = 1usize - 5; | ^^^^^^^^^^ attempt to compute `1_usize - 5_usize`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:187:14 + --> $DIR/lint-overflowing-ops.rs:186:14 | LL | let _n = -i8::MIN; | ^^^^^^^^ attempt to negate `i8::MIN`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:192:14 + --> $DIR/lint-overflowing-ops.rs:191:14 | LL | let _n = u8::MAX * 5; | ^^^^^^^^^^^ attempt to compute `u8::MAX * 5_u8`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:195:14 + --> $DIR/lint-overflowing-ops.rs:194:14 | LL | let _n = u16::MAX * 5; | ^^^^^^^^^^^^ attempt to compute `u16::MAX * 5_u16`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:198:14 + --> $DIR/lint-overflowing-ops.rs:197:14 | LL | let _n = u32::MAX * 5; | ^^^^^^^^^^^^ attempt to compute `u32::MAX * 5_u32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:201:14 + --> $DIR/lint-overflowing-ops.rs:200:14 | LL | let _n = u64::MAX * 5; | ^^^^^^^^^^^^ attempt to compute `u64::MAX * 5_u64`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:204:14 + --> $DIR/lint-overflowing-ops.rs:203:14 | LL | let _n = u128::MAX * 5; | ^^^^^^^^^^^^^ attempt to compute `u128::MAX * 5_u128`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:207:14 + --> $DIR/lint-overflowing-ops.rs:206:14 | LL | let _n = usize::MAX * 5; | ^^^^^^^^^^^^^^ attempt to compute `usize::MAX * 5_usize`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:210:14 + --> $DIR/lint-overflowing-ops.rs:209:14 | LL | let _n = i8::MAX * i8::MAX; | ^^^^^^^^^^^^^^^^^ attempt to compute `i8::MAX * i8::MAX`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:213:14 + --> $DIR/lint-overflowing-ops.rs:212:14 | LL | let _n = i16::MAX * 5; | ^^^^^^^^^^^^ attempt to compute `i16::MAX * 5_i16`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:216:14 + --> $DIR/lint-overflowing-ops.rs:215:14 | LL | let _n = i32::MAX * 5; | ^^^^^^^^^^^^ attempt to compute `i32::MAX * 5_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:219:14 + --> $DIR/lint-overflowing-ops.rs:218:14 | LL | let _n = i64::MAX * 5; | ^^^^^^^^^^^^ attempt to compute `i64::MAX * 5_i64`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:222:14 + --> $DIR/lint-overflowing-ops.rs:221:14 | LL | let _n = i128::MAX * 5; | ^^^^^^^^^^^^^ attempt to compute `i128::MAX * 5_i128`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:225:14 + --> $DIR/lint-overflowing-ops.rs:224:14 | LL | let _n = isize::MAX * 5; | ^^^^^^^^^^^^^^ attempt to compute `isize::MAX * 5_isize`, which would overflow error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:230:14 + --> $DIR/lint-overflowing-ops.rs:229:14 | LL | let _n = 1u8 / 0; | ^^^^^^^ attempt to divide `1_u8` by zero @@ -787,439 +787,439 @@ LL | let _n = 1u8 / 0; = note: `#[deny(unconditional_panic)]` on by default error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:231:15 + --> $DIR/lint-overflowing-ops.rs:230:15 | LL | let _n = &(1u8 / 0); | ^^^^^^^^^ attempt to divide `1_u8` by zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:233:14 + --> $DIR/lint-overflowing-ops.rs:232:14 | LL | let _n = 1u16 / 0; | ^^^^^^^^ attempt to divide `1_u16` by zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:234:15 + --> $DIR/lint-overflowing-ops.rs:233:15 | LL | let _n = &(1u16 / 0); | ^^^^^^^^^^ attempt to divide `1_u16` by zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:236:14 + --> $DIR/lint-overflowing-ops.rs:235:14 | LL | let _n = 1u32 / 0; | ^^^^^^^^ attempt to divide `1_u32` by zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:237:15 + --> $DIR/lint-overflowing-ops.rs:236:15 | LL | let _n = &(1u32 / 0); | ^^^^^^^^^^ attempt to divide `1_u32` by zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:239:14 + --> $DIR/lint-overflowing-ops.rs:238:14 | LL | let _n = 1u64 / 0; | ^^^^^^^^ attempt to divide `1_u64` by zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:240:15 + --> $DIR/lint-overflowing-ops.rs:239:15 | LL | let _n = &(1u64 / 0); | ^^^^^^^^^^ attempt to divide `1_u64` by zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:242:14 + --> $DIR/lint-overflowing-ops.rs:241:14 | LL | let _n = 1u128 / 0; | ^^^^^^^^^ attempt to divide `1_u128` by zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:243:15 + --> $DIR/lint-overflowing-ops.rs:242:15 | LL | let _n = &(1u128 / 0); | ^^^^^^^^^^^ attempt to divide `1_u128` by zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:245:14 + --> $DIR/lint-overflowing-ops.rs:244:14 | LL | let _n = 1usize / 0; | ^^^^^^^^^^ attempt to divide `1_usize` by zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:246:15 + --> $DIR/lint-overflowing-ops.rs:245:15 | LL | let _n = &(1usize / 0); | ^^^^^^^^^^^^ attempt to divide `1_usize` by zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:248:14 + --> $DIR/lint-overflowing-ops.rs:247:14 | LL | let _n = 1i8 / 0; | ^^^^^^^ attempt to divide `1_i8` by zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:249:15 + --> $DIR/lint-overflowing-ops.rs:248:15 | LL | let _n = &(1i8 / 0); | ^^^^^^^^^ attempt to divide `1_i8` by zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:250:14 + --> $DIR/lint-overflowing-ops.rs:249:14 | LL | let _n = i8::MIN / -1; | ^^^^^^^^^^^^ attempt to compute `i8::MIN / -1_i8`, which would overflow error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:251:15 + --> $DIR/lint-overflowing-ops.rs:250:15 | LL | let _n = &(i8::MIN / -1); | ^^^^^^^^^^^^^^ attempt to compute `i8::MIN / -1_i8`, which would overflow error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:253:14 + --> $DIR/lint-overflowing-ops.rs:252:14 | LL | let _n = 1i16 / 0; | ^^^^^^^^ attempt to divide `1_i16` by zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:254:15 + --> $DIR/lint-overflowing-ops.rs:253:15 | LL | let _n = &(1i16 / 0); | ^^^^^^^^^^ attempt to divide `1_i16` by zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:255:14 + --> $DIR/lint-overflowing-ops.rs:254:14 | LL | let _n = i16::MIN / -1; | ^^^^^^^^^^^^^ attempt to compute `i16::MIN / -1_i16`, which would overflow error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:256:15 + --> $DIR/lint-overflowing-ops.rs:255:15 | LL | let _n = &(i16::MIN / -1); | ^^^^^^^^^^^^^^^ attempt to compute `i16::MIN / -1_i16`, which would overflow error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:258:14 + --> $DIR/lint-overflowing-ops.rs:257:14 | LL | let _n = 1i32 / 0; | ^^^^^^^^ attempt to divide `1_i32` by zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:259:15 + --> $DIR/lint-overflowing-ops.rs:258:15 | LL | let _n = &(1i32 / 0); | ^^^^^^^^^^ attempt to divide `1_i32` by zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:260:14 + --> $DIR/lint-overflowing-ops.rs:259:14 | LL | let _n = i32::MIN / -1; | ^^^^^^^^^^^^^ attempt to compute `i32::MIN / -1_i32`, which would overflow error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:261:15 + --> $DIR/lint-overflowing-ops.rs:260:15 | LL | let _n = &(i32::MIN / -1); | ^^^^^^^^^^^^^^^ attempt to compute `i32::MIN / -1_i32`, which would overflow error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:263:14 + --> $DIR/lint-overflowing-ops.rs:262:14 | LL | let _n = 1i64 / 0; | ^^^^^^^^ attempt to divide `1_i64` by zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:264:15 + --> $DIR/lint-overflowing-ops.rs:263:15 | LL | let _n = &(1i64 / 0); | ^^^^^^^^^^ attempt to divide `1_i64` by zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:265:14 + --> $DIR/lint-overflowing-ops.rs:264:14 | LL | let _n = i64::MIN / -1; | ^^^^^^^^^^^^^ attempt to compute `i64::MIN / -1_i64`, which would overflow error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:266:15 + --> $DIR/lint-overflowing-ops.rs:265:15 | LL | let _n = &(i64::MIN / -1); | ^^^^^^^^^^^^^^^ attempt to compute `i64::MIN / -1_i64`, which would overflow error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:268:14 + --> $DIR/lint-overflowing-ops.rs:267:14 | LL | let _n = 1i128 / 0; | ^^^^^^^^^ attempt to divide `1_i128` by zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:269:15 + --> $DIR/lint-overflowing-ops.rs:268:15 | LL | let _n = &(1i128 / 0); | ^^^^^^^^^^^ attempt to divide `1_i128` by zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:270:14 + --> $DIR/lint-overflowing-ops.rs:269:14 | LL | let _n = i128::MIN / -1; | ^^^^^^^^^^^^^^ attempt to compute `i128::MIN / -1_i128`, which would overflow error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:271:15 + --> $DIR/lint-overflowing-ops.rs:270:15 | LL | let _n = &(i128::MIN / -1); | ^^^^^^^^^^^^^^^^ attempt to compute `i128::MIN / -1_i128`, which would overflow error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:273:14 + --> $DIR/lint-overflowing-ops.rs:272:14 | LL | let _n = 1isize / 0; | ^^^^^^^^^^ attempt to divide `1_isize` by zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:274:15 + --> $DIR/lint-overflowing-ops.rs:273:15 | LL | let _n = &(1isize / 0); | ^^^^^^^^^^^^ attempt to divide `1_isize` by zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:275:14 + --> $DIR/lint-overflowing-ops.rs:274:14 | LL | let _n = isize::MIN / -1; | ^^^^^^^^^^^^^^^ attempt to compute `isize::MIN / -1_isize`, which would overflow error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:276:15 + --> $DIR/lint-overflowing-ops.rs:275:15 | LL | let _n = &(isize::MIN / -1); | ^^^^^^^^^^^^^^^^^ attempt to compute `isize::MIN / -1_isize`, which would overflow error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:280:14 + --> $DIR/lint-overflowing-ops.rs:279:14 | LL | let _n = 1u8 % 0; | ^^^^^^^ attempt to calculate the remainder of `1_u8` with a divisor of zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:281:15 + --> $DIR/lint-overflowing-ops.rs:280:15 | LL | let _n = &(1u8 % 0); | ^^^^^^^^^ attempt to calculate the remainder of `1_u8` with a divisor of zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:283:14 + --> $DIR/lint-overflowing-ops.rs:282:14 | LL | let _n = 1u16 % 0; | ^^^^^^^^ attempt to calculate the remainder of `1_u16` with a divisor of zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:284:15 + --> $DIR/lint-overflowing-ops.rs:283:15 | LL | let _n = &(1u16 % 0); | ^^^^^^^^^^ attempt to calculate the remainder of `1_u16` with a divisor of zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:286:14 + --> $DIR/lint-overflowing-ops.rs:285:14 | LL | let _n = 1u32 % 0; | ^^^^^^^^ attempt to calculate the remainder of `1_u32` with a divisor of zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:287:15 + --> $DIR/lint-overflowing-ops.rs:286:15 | LL | let _n = &(1u32 % 0); | ^^^^^^^^^^ attempt to calculate the remainder of `1_u32` with a divisor of zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:289:14 + --> $DIR/lint-overflowing-ops.rs:288:14 | LL | let _n = 1u64 % 0; | ^^^^^^^^ attempt to calculate the remainder of `1_u64` with a divisor of zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:290:15 + --> $DIR/lint-overflowing-ops.rs:289:15 | LL | let _n = &(1u64 % 0); | ^^^^^^^^^^ attempt to calculate the remainder of `1_u64` with a divisor of zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:292:14 + --> $DIR/lint-overflowing-ops.rs:291:14 | LL | let _n = 1u128 % 0; | ^^^^^^^^^ attempt to calculate the remainder of `1_u128` with a divisor of zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:293:15 + --> $DIR/lint-overflowing-ops.rs:292:15 | LL | let _n = &(1u128 % 0); | ^^^^^^^^^^^ attempt to calculate the remainder of `1_u128` with a divisor of zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:295:14 + --> $DIR/lint-overflowing-ops.rs:294:14 | LL | let _n = 1usize % 0; | ^^^^^^^^^^ attempt to calculate the remainder of `1_usize` with a divisor of zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:296:15 + --> $DIR/lint-overflowing-ops.rs:295:15 | LL | let _n = &(1usize % 0); | ^^^^^^^^^^^^ attempt to calculate the remainder of `1_usize` with a divisor of zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:298:14 + --> $DIR/lint-overflowing-ops.rs:297:14 | LL | let _n = 1i8 % 0; | ^^^^^^^ attempt to calculate the remainder of `1_i8` with a divisor of zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:299:15 + --> $DIR/lint-overflowing-ops.rs:298:15 | LL | let _n = &(1i8 % 0); | ^^^^^^^^^ attempt to calculate the remainder of `1_i8` with a divisor of zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:300:14 + --> $DIR/lint-overflowing-ops.rs:299:14 | LL | let _n = i8::MIN % -1; | ^^^^^^^^^^^^ attempt to compute `i8::MIN % -1_i8`, which would overflow error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:301:15 + --> $DIR/lint-overflowing-ops.rs:300:15 | LL | let _n = &(i8::MIN % -1); | ^^^^^^^^^^^^^^ attempt to compute `i8::MIN % -1_i8`, which would overflow error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:303:14 + --> $DIR/lint-overflowing-ops.rs:302:14 | LL | let _n = 1i16 % 0; | ^^^^^^^^ attempt to calculate the remainder of `1_i16` with a divisor of zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:304:15 + --> $DIR/lint-overflowing-ops.rs:303:15 | LL | let _n = &(1i16 % 0); | ^^^^^^^^^^ attempt to calculate the remainder of `1_i16` with a divisor of zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:305:14 + --> $DIR/lint-overflowing-ops.rs:304:14 | LL | let _n = i16::MIN % -1; | ^^^^^^^^^^^^^ attempt to compute `i16::MIN % -1_i16`, which would overflow error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:306:15 + --> $DIR/lint-overflowing-ops.rs:305:15 | LL | let _n = &(i16::MIN % -1); | ^^^^^^^^^^^^^^^ attempt to compute `i16::MIN % -1_i16`, which would overflow error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:308:14 + --> $DIR/lint-overflowing-ops.rs:307:14 | LL | let _n = 1i32 % 0; | ^^^^^^^^ attempt to calculate the remainder of `1_i32` with a divisor of zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:309:15 + --> $DIR/lint-overflowing-ops.rs:308:15 | LL | let _n = &(1i32 % 0); | ^^^^^^^^^^ attempt to calculate the remainder of `1_i32` with a divisor of zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:310:14 + --> $DIR/lint-overflowing-ops.rs:309:14 | LL | let _n = i32::MIN % -1; | ^^^^^^^^^^^^^ attempt to compute `i32::MIN % -1_i32`, which would overflow error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:311:15 + --> $DIR/lint-overflowing-ops.rs:310:15 | LL | let _n = &(i32::MIN % -1); | ^^^^^^^^^^^^^^^ attempt to compute `i32::MIN % -1_i32`, which would overflow error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:313:14 + --> $DIR/lint-overflowing-ops.rs:312:14 | LL | let _n = 1i64 % 0; | ^^^^^^^^ attempt to calculate the remainder of `1_i64` with a divisor of zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:314:15 + --> $DIR/lint-overflowing-ops.rs:313:15 | LL | let _n = &(1i64 % 0); | ^^^^^^^^^^ attempt to calculate the remainder of `1_i64` with a divisor of zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:315:14 + --> $DIR/lint-overflowing-ops.rs:314:14 | LL | let _n = i64::MIN % -1; | ^^^^^^^^^^^^^ attempt to compute `i64::MIN % -1_i64`, which would overflow error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:316:15 + --> $DIR/lint-overflowing-ops.rs:315:15 | LL | let _n = &(i64::MIN % -1); | ^^^^^^^^^^^^^^^ attempt to compute `i64::MIN % -1_i64`, which would overflow error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:318:14 + --> $DIR/lint-overflowing-ops.rs:317:14 | LL | let _n = 1i128 % 0; | ^^^^^^^^^ attempt to calculate the remainder of `1_i128` with a divisor of zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:319:15 + --> $DIR/lint-overflowing-ops.rs:318:15 | LL | let _n = &(1i128 % 0); | ^^^^^^^^^^^ attempt to calculate the remainder of `1_i128` with a divisor of zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:320:14 + --> $DIR/lint-overflowing-ops.rs:319:14 | LL | let _n = i128::MIN % -1; | ^^^^^^^^^^^^^^ attempt to compute `i128::MIN % -1_i128`, which would overflow error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:321:15 + --> $DIR/lint-overflowing-ops.rs:320:15 | LL | let _n = &(i128::MIN % -1); | ^^^^^^^^^^^^^^^^ attempt to compute `i128::MIN % -1_i128`, which would overflow error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:323:14 + --> $DIR/lint-overflowing-ops.rs:322:14 | LL | let _n = 1isize % 0; | ^^^^^^^^^^ attempt to calculate the remainder of `1_isize` with a divisor of zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:324:15 + --> $DIR/lint-overflowing-ops.rs:323:15 | LL | let _n = &(1isize % 0); | ^^^^^^^^^^^^ attempt to calculate the remainder of `1_isize` with a divisor of zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:325:14 + --> $DIR/lint-overflowing-ops.rs:324:14 | LL | let _n = isize::MIN % -1; | ^^^^^^^^^^^^^^^ attempt to compute `isize::MIN % -1_isize`, which would overflow error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:326:15 + --> $DIR/lint-overflowing-ops.rs:325:15 | LL | let _n = &(isize::MIN % -1); | ^^^^^^^^^^^^^^^^^ attempt to compute `isize::MIN % -1_isize`, which would overflow error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:329:14 + --> $DIR/lint-overflowing-ops.rs:328:14 | LL | let _n = [1, 2, 3][4]; | ^^^^^^^^^^^^ index out of bounds: the length is 3 but the index is 4 error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:330:15 + --> $DIR/lint-overflowing-ops.rs:329:15 | LL | let _n = &([1, 2, 3][4]); | ^^^^^^^^^^^^^^ index out of bounds: the length is 3 but the index is 4 diff --git a/tests/ui/lint/lint-overflowing-ops.opt.stderr b/tests/ui/lint/lint-overflowing-ops.opt.stderr index 1b7b73cec38d5..6c34405c5efd0 100644 --- a/tests/ui/lint/lint-overflowing-ops.opt.stderr +++ b/tests/ui/lint/lint-overflowing-ops.opt.stderr @@ -1,785 +1,785 @@ error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:28:14 + --> $DIR/lint-overflowing-ops.rs:27:14 | LL | let _n = 1u8 << 8; | ^^^^^^^^ attempt to shift left by `8_i32`, which would overflow | note: the lint level is defined here - --> $DIR/lint-overflowing-ops.rs:17:9 + --> $DIR/lint-overflowing-ops.rs:16:9 | LL | #![deny(arithmetic_overflow)] | ^^^^^^^^^^^^^^^^^^^ error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:226:15 + --> $DIR/lint-overflowing-ops.rs:225:15 | LL | let _n = &(isize::MAX * 5); | ^^^^^^^^^^^^^^^^ attempt to compute `isize::MAX * 5_isize`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:223:15 + --> $DIR/lint-overflowing-ops.rs:222:15 | LL | let _n = &(i128::MAX * 5); | ^^^^^^^^^^^^^^^ attempt to compute `i128::MAX * 5_i128`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:220:15 + --> $DIR/lint-overflowing-ops.rs:219:15 | LL | let _n = &(i64::MAX * 5); | ^^^^^^^^^^^^^^ attempt to compute `i64::MAX * 5_i64`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:217:15 + --> $DIR/lint-overflowing-ops.rs:216:15 | LL | let _n = &(i32::MAX * 5); | ^^^^^^^^^^^^^^ attempt to compute `i32::MAX * 5_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:214:15 + --> $DIR/lint-overflowing-ops.rs:213:15 | LL | let _n = &(i16::MAX * 5); | ^^^^^^^^^^^^^^ attempt to compute `i16::MAX * 5_i16`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:211:15 + --> $DIR/lint-overflowing-ops.rs:210:15 | LL | let _n = &(i8::MAX * i8::MAX); | ^^^^^^^^^^^^^^^^^^^ attempt to compute `i8::MAX * i8::MAX`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:208:15 + --> $DIR/lint-overflowing-ops.rs:207:15 | LL | let _n = &(usize::MAX * 5); | ^^^^^^^^^^^^^^^^ attempt to compute `usize::MAX * 5_usize`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:205:15 + --> $DIR/lint-overflowing-ops.rs:204:15 | LL | let _n = &(u128::MAX * 5); | ^^^^^^^^^^^^^^^ attempt to compute `u128::MAX * 5_u128`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:202:15 + --> $DIR/lint-overflowing-ops.rs:201:15 | LL | let _n = &(u64::MAX * 5); | ^^^^^^^^^^^^^^ attempt to compute `u64::MAX * 5_u64`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:199:15 + --> $DIR/lint-overflowing-ops.rs:198:15 | LL | let _n = &(u32::MAX * 5); | ^^^^^^^^^^^^^^ attempt to compute `u32::MAX * 5_u32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:196:15 + --> $DIR/lint-overflowing-ops.rs:195:15 | LL | let _n = &(u16::MAX * 5); | ^^^^^^^^^^^^^^ attempt to compute `u16::MAX * 5_u16`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:193:15 + --> $DIR/lint-overflowing-ops.rs:192:15 | LL | let _n = &(u8::MAX * 5); | ^^^^^^^^^^^^^ attempt to compute `u8::MAX * 5_u8`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:188:15 + --> $DIR/lint-overflowing-ops.rs:187:15 | LL | let _n = &(-i8::MIN); | ^^^^^^^^^^ attempt to negate `i8::MIN`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:185:15 + --> $DIR/lint-overflowing-ops.rs:184:15 | LL | let _n = &(1usize - 5); | ^^^^^^^^^^^^ attempt to compute `1_usize - 5_usize`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:182:15 + --> $DIR/lint-overflowing-ops.rs:181:15 | LL | let _n = &(-5isize - isize::MAX); | ^^^^^^^^^^^^^^^^^^^^^^ attempt to compute `-5_isize - isize::MAX`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:179:15 + --> $DIR/lint-overflowing-ops.rs:178:15 | LL | let _n = &(-5i128 - i128::MAX); | ^^^^^^^^^^^^^^^^^^^^ attempt to compute `-5_i128 - i128::MAX`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:176:15 + --> $DIR/lint-overflowing-ops.rs:175:15 | LL | let _n = &(-5i64 - i64::MAX); | ^^^^^^^^^^^^^^^^^^ attempt to compute `-5_i64 - i64::MAX`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:173:15 + --> $DIR/lint-overflowing-ops.rs:172:15 | LL | let _n = &(-5i32 - i32::MAX); | ^^^^^^^^^^^^^^^^^^ attempt to compute `-5_i32 - i32::MAX`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:170:15 + --> $DIR/lint-overflowing-ops.rs:169:15 | LL | let _n = &(-5i16 - i16::MAX); | ^^^^^^^^^^^^^^^^^^ attempt to compute `-5_i16 - i16::MAX`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:167:15 + --> $DIR/lint-overflowing-ops.rs:166:15 | LL | let _n = &(-5i8 - i8::MAX); | ^^^^^^^^^^^^^^^^ attempt to compute `-5_i8 - i8::MAX`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:164:15 + --> $DIR/lint-overflowing-ops.rs:163:15 | LL | let _n = &(1u128 - 5); | ^^^^^^^^^^^ attempt to compute `1_u128 - 5_u128`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:161:15 + --> $DIR/lint-overflowing-ops.rs:160:15 | LL | let _n = &(1u64 - 5); | ^^^^^^^^^^ attempt to compute `1_u64 - 5_u64`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:158:15 + --> $DIR/lint-overflowing-ops.rs:157:15 | LL | let _n = &(1u32 - 5); | ^^^^^^^^^^ attempt to compute `1_u32 - 5_u32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:155:15 + --> $DIR/lint-overflowing-ops.rs:154:15 | LL | let _n = &(1u16 - 5); | ^^^^^^^^^^ attempt to compute `1_u16 - 5_u16`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:152:15 + --> $DIR/lint-overflowing-ops.rs:151:15 | LL | let _n = &(1u8 - 5); | ^^^^^^^^^ attempt to compute `1_u8 - 5_u8`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:147:15 + --> $DIR/lint-overflowing-ops.rs:146:15 | LL | let _n = &(1usize + usize::MAX); | ^^^^^^^^^^^^^^^^^^^^^ attempt to compute `1_usize + usize::MAX`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:144:15 + --> $DIR/lint-overflowing-ops.rs:143:15 | LL | let _n = &(1isize + isize::MAX); | ^^^^^^^^^^^^^^^^^^^^^ attempt to compute `1_isize + isize::MAX`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:141:15 + --> $DIR/lint-overflowing-ops.rs:140:15 | LL | let _n = &(1i128 + i128::MAX); | ^^^^^^^^^^^^^^^^^^^ attempt to compute `1_i128 + i128::MAX`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:138:15 + --> $DIR/lint-overflowing-ops.rs:137:15 | LL | let _n = &(1i64 + i64::MAX); | ^^^^^^^^^^^^^^^^^ attempt to compute `1_i64 + i64::MAX`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:135:15 + --> $DIR/lint-overflowing-ops.rs:134:15 | LL | let _n = &(1i32 + i32::MAX); | ^^^^^^^^^^^^^^^^^ attempt to compute `1_i32 + i32::MAX`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:132:15 + --> $DIR/lint-overflowing-ops.rs:131:15 | LL | let _n = &(1i16 + i16::MAX); | ^^^^^^^^^^^^^^^^^ attempt to compute `1_i16 + i16::MAX`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:129:15 + --> $DIR/lint-overflowing-ops.rs:128:15 | LL | let _n = &(1i8 + i8::MAX); | ^^^^^^^^^^^^^^^ attempt to compute `1_i8 + i8::MAX`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:126:15 + --> $DIR/lint-overflowing-ops.rs:125:15 | LL | let _n = &(1u128 + u128::MAX); | ^^^^^^^^^^^^^^^^^^^ attempt to compute `1_u128 + u128::MAX`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:123:15 + --> $DIR/lint-overflowing-ops.rs:122:15 | LL | let _n = &(1u64 + u64::MAX); | ^^^^^^^^^^^^^^^^^ attempt to compute `1_u64 + u64::MAX`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:120:15 + --> $DIR/lint-overflowing-ops.rs:119:15 | LL | let _n = &(1u32 + u32::MAX); | ^^^^^^^^^^^^^^^^^ attempt to compute `1_u32 + u32::MAX`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:117:15 + --> $DIR/lint-overflowing-ops.rs:116:15 | LL | let _n = &(1u16 + u16::MAX); | ^^^^^^^^^^^^^^^^^ attempt to compute `1_u16 + u16::MAX`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:114:15 + --> $DIR/lint-overflowing-ops.rs:113:15 | LL | let _n = &(1u8 + u8::MAX); | ^^^^^^^^^^^^^^^ attempt to compute `1_u8 + u8::MAX`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:110:15 + --> $DIR/lint-overflowing-ops.rs:109:15 | LL | let _n = &(1i64 >> [64][0]); | ^^^^^^^^^^^^^^^^^ attempt to shift right by `64_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:107:15 + --> $DIR/lint-overflowing-ops.rs:106:15 | LL | let _n = &(1_usize >> BITS); | ^^^^^^^^^^^^^^^^^ attempt to shift right by `%BITS%`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:104:15 + --> $DIR/lint-overflowing-ops.rs:103:15 | LL | let _n = &(1_isize >> BITS); | ^^^^^^^^^^^^^^^^^ attempt to shift right by `%BITS%`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:101:15 + --> $DIR/lint-overflowing-ops.rs:100:15 | LL | let _n = &(1i128 >> 128); | ^^^^^^^^^^^^^^ attempt to shift right by `128_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:98:15 + --> $DIR/lint-overflowing-ops.rs:97:15 | LL | let _n = &(1i64 >> 64); | ^^^^^^^^^^^^ attempt to shift right by `64_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:95:15 + --> $DIR/lint-overflowing-ops.rs:94:15 | LL | let _n = &(1i32 >> 32); | ^^^^^^^^^^^^ attempt to shift right by `32_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:92:15 + --> $DIR/lint-overflowing-ops.rs:91:15 | LL | let _n = &(1i16 >> 16); | ^^^^^^^^^^^^ attempt to shift right by `16_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:89:15 + --> $DIR/lint-overflowing-ops.rs:88:15 | LL | let _n = &(1i8 >> 8); | ^^^^^^^^^^ attempt to shift right by `8_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:86:15 + --> $DIR/lint-overflowing-ops.rs:85:15 | LL | let _n = &(1u128 >> 128); | ^^^^^^^^^^^^^^ attempt to shift right by `128_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:83:15 + --> $DIR/lint-overflowing-ops.rs:82:15 | LL | let _n = &(1u64 >> 64); | ^^^^^^^^^^^^ attempt to shift right by `64_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:80:15 + --> $DIR/lint-overflowing-ops.rs:79:15 | LL | let _n = &(1u32 >> 32); | ^^^^^^^^^^^^ attempt to shift right by `32_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:77:15 + --> $DIR/lint-overflowing-ops.rs:76:15 | LL | let _n = &(1u16 >> 16); | ^^^^^^^^^^^^ attempt to shift right by `16_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:74:15 + --> $DIR/lint-overflowing-ops.rs:73:15 | LL | let _n = &(1u8 >> 8); | ^^^^^^^^^^ attempt to shift right by `8_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:65:15 + --> $DIR/lint-overflowing-ops.rs:64:15 | LL | let _n = &(1 << -1); | ^^^^^^^^^ attempt to shift left by `-1_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:62:15 + --> $DIR/lint-overflowing-ops.rs:61:15 | LL | let _n = &(1_usize << BITS); | ^^^^^^^^^^^^^^^^^ attempt to shift left by `%BITS%`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:59:15 + --> $DIR/lint-overflowing-ops.rs:58:15 | LL | let _n = &(1_isize << BITS); | ^^^^^^^^^^^^^^^^^ attempt to shift left by `%BITS%`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:56:15 + --> $DIR/lint-overflowing-ops.rs:55:15 | LL | let _n = &(1i128 << 128); | ^^^^^^^^^^^^^^ attempt to shift left by `128_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:53:15 + --> $DIR/lint-overflowing-ops.rs:52:15 | LL | let _n = &(1i64 << 64); | ^^^^^^^^^^^^ attempt to shift left by `64_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:50:15 + --> $DIR/lint-overflowing-ops.rs:49:15 | LL | let _n = &(1i32 << 32); | ^^^^^^^^^^^^ attempt to shift left by `32_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:47:15 + --> $DIR/lint-overflowing-ops.rs:46:15 | LL | let _n = &(1i16 << 16); | ^^^^^^^^^^^^ attempt to shift left by `16_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:44:15 + --> $DIR/lint-overflowing-ops.rs:43:15 | LL | let _n = &(1i8 << 8); | ^^^^^^^^^^ attempt to shift left by `8_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:41:15 + --> $DIR/lint-overflowing-ops.rs:40:15 | LL | let _n = &(1u128 << 128); | ^^^^^^^^^^^^^^ attempt to shift left by `128_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:38:15 + --> $DIR/lint-overflowing-ops.rs:37:15 | LL | let _n = &(1u64 << 64); | ^^^^^^^^^^^^ attempt to shift left by `64_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:35:15 + --> $DIR/lint-overflowing-ops.rs:34:15 | LL | let _n = &(1u32 << 32); | ^^^^^^^^^^^^ attempt to shift left by `32_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:32:15 + --> $DIR/lint-overflowing-ops.rs:31:15 | LL | let _n = &(1u16 << 16); | ^^^^^^^^^^^^ attempt to shift left by `16_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:29:15 + --> $DIR/lint-overflowing-ops.rs:28:15 | LL | let _n = &(1u8 << 8); | ^^^^^^^^^^ attempt to shift left by `8_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:31:14 + --> $DIR/lint-overflowing-ops.rs:30:14 | LL | let _n = 1u16 << 16; | ^^^^^^^^^^ attempt to shift left by `16_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:34:14 + --> $DIR/lint-overflowing-ops.rs:33:14 | LL | let _n = 1u32 << 32; | ^^^^^^^^^^ attempt to shift left by `32_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:37:14 + --> $DIR/lint-overflowing-ops.rs:36:14 | LL | let _n = 1u64 << 64; | ^^^^^^^^^^ attempt to shift left by `64_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:40:14 + --> $DIR/lint-overflowing-ops.rs:39:14 | LL | let _n = 1u128 << 128; | ^^^^^^^^^^^^ attempt to shift left by `128_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:43:14 + --> $DIR/lint-overflowing-ops.rs:42:14 | LL | let _n = 1i8 << 8; | ^^^^^^^^ attempt to shift left by `8_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:46:14 + --> $DIR/lint-overflowing-ops.rs:45:14 | LL | let _n = 1i16 << 16; | ^^^^^^^^^^ attempt to shift left by `16_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:49:14 + --> $DIR/lint-overflowing-ops.rs:48:14 | LL | let _n = 1i32 << 32; | ^^^^^^^^^^ attempt to shift left by `32_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:52:14 + --> $DIR/lint-overflowing-ops.rs:51:14 | LL | let _n = 1i64 << 64; | ^^^^^^^^^^ attempt to shift left by `64_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:55:14 + --> $DIR/lint-overflowing-ops.rs:54:14 | LL | let _n = 1i128 << 128; | ^^^^^^^^^^^^ attempt to shift left by `128_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:58:14 + --> $DIR/lint-overflowing-ops.rs:57:14 | LL | let _n = 1_isize << BITS; | ^^^^^^^^^^^^^^^ attempt to shift left by `%BITS%`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:61:14 + --> $DIR/lint-overflowing-ops.rs:60:14 | LL | let _n = 1_usize << BITS; | ^^^^^^^^^^^^^^^ attempt to shift left by `%BITS%`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:64:14 + --> $DIR/lint-overflowing-ops.rs:63:14 | LL | let _n = 1 << -1; | ^^^^^^^ attempt to shift left by `-1_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:69:14 + --> $DIR/lint-overflowing-ops.rs:68:14 | LL | let _n = -1_i64 >> 64; | ^^^^^^^^^^^^ attempt to shift right by `64_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:70:14 + --> $DIR/lint-overflowing-ops.rs:69:14 | LL | let _n = -1_i32 >> 32; | ^^^^^^^^^^^^ attempt to shift right by `32_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:71:14 + --> $DIR/lint-overflowing-ops.rs:70:14 | LL | let _n = -1_i32 >> -1; | ^^^^^^^^^^^^ attempt to shift right by `-1_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:73:14 + --> $DIR/lint-overflowing-ops.rs:72:14 | LL | let _n = 1u8 >> 8; | ^^^^^^^^ attempt to shift right by `8_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:76:14 + --> $DIR/lint-overflowing-ops.rs:75:14 | LL | let _n = 1u16 >> 16; | ^^^^^^^^^^ attempt to shift right by `16_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:79:14 + --> $DIR/lint-overflowing-ops.rs:78:14 | LL | let _n = 1u32 >> 32; | ^^^^^^^^^^ attempt to shift right by `32_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:82:14 + --> $DIR/lint-overflowing-ops.rs:81:14 | LL | let _n = 1u64 >> 64; | ^^^^^^^^^^ attempt to shift right by `64_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:85:14 + --> $DIR/lint-overflowing-ops.rs:84:14 | LL | let _n = 1u128 >> 128; | ^^^^^^^^^^^^ attempt to shift right by `128_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:88:14 + --> $DIR/lint-overflowing-ops.rs:87:14 | LL | let _n = 1i8 >> 8; | ^^^^^^^^ attempt to shift right by `8_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:91:14 + --> $DIR/lint-overflowing-ops.rs:90:14 | LL | let _n = 1i16 >> 16; | ^^^^^^^^^^ attempt to shift right by `16_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:94:14 + --> $DIR/lint-overflowing-ops.rs:93:14 | LL | let _n = 1i32 >> 32; | ^^^^^^^^^^ attempt to shift right by `32_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:97:14 + --> $DIR/lint-overflowing-ops.rs:96:14 | LL | let _n = 1i64 >> 64; | ^^^^^^^^^^ attempt to shift right by `64_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:100:14 + --> $DIR/lint-overflowing-ops.rs:99:14 | LL | let _n = 1i128 >> 128; | ^^^^^^^^^^^^ attempt to shift right by `128_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:103:14 + --> $DIR/lint-overflowing-ops.rs:102:14 | LL | let _n = 1_isize >> BITS; | ^^^^^^^^^^^^^^^ attempt to shift right by `%BITS%`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:106:14 + --> $DIR/lint-overflowing-ops.rs:105:14 | LL | let _n = 1_usize >> BITS; | ^^^^^^^^^^^^^^^ attempt to shift right by `%BITS%`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:109:14 + --> $DIR/lint-overflowing-ops.rs:108:14 | LL | let _n = 1i64 >> [64][0]; | ^^^^^^^^^^^^^^^ attempt to shift right by `64_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:113:14 + --> $DIR/lint-overflowing-ops.rs:112:14 | LL | let _n = 1u8 + u8::MAX; | ^^^^^^^^^^^^^ attempt to compute `1_u8 + u8::MAX`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:116:14 + --> $DIR/lint-overflowing-ops.rs:115:14 | LL | let _n = 1u16 + u16::MAX; | ^^^^^^^^^^^^^^^ attempt to compute `1_u16 + u16::MAX`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:119:14 + --> $DIR/lint-overflowing-ops.rs:118:14 | LL | let _n = 1u32 + u32::MAX; | ^^^^^^^^^^^^^^^ attempt to compute `1_u32 + u32::MAX`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:122:14 + --> $DIR/lint-overflowing-ops.rs:121:14 | LL | let _n = 1u64 + u64::MAX; | ^^^^^^^^^^^^^^^ attempt to compute `1_u64 + u64::MAX`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:125:14 + --> $DIR/lint-overflowing-ops.rs:124:14 | LL | let _n = 1u128 + u128::MAX; | ^^^^^^^^^^^^^^^^^ attempt to compute `1_u128 + u128::MAX`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:128:14 + --> $DIR/lint-overflowing-ops.rs:127:14 | LL | let _n = 1i8 + i8::MAX; | ^^^^^^^^^^^^^ attempt to compute `1_i8 + i8::MAX`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:131:14 + --> $DIR/lint-overflowing-ops.rs:130:14 | LL | let _n = 1i16 + i16::MAX; | ^^^^^^^^^^^^^^^ attempt to compute `1_i16 + i16::MAX`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:134:14 + --> $DIR/lint-overflowing-ops.rs:133:14 | LL | let _n = 1i32 + i32::MAX; | ^^^^^^^^^^^^^^^ attempt to compute `1_i32 + i32::MAX`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:137:14 + --> $DIR/lint-overflowing-ops.rs:136:14 | LL | let _n = 1i64 + i64::MAX; | ^^^^^^^^^^^^^^^ attempt to compute `1_i64 + i64::MAX`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:140:14 + --> $DIR/lint-overflowing-ops.rs:139:14 | LL | let _n = 1i128 + i128::MAX; | ^^^^^^^^^^^^^^^^^ attempt to compute `1_i128 + i128::MAX`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:143:14 + --> $DIR/lint-overflowing-ops.rs:142:14 | LL | let _n = 1isize + isize::MAX; | ^^^^^^^^^^^^^^^^^^^ attempt to compute `1_isize + isize::MAX`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:146:14 + --> $DIR/lint-overflowing-ops.rs:145:14 | LL | let _n = 1usize + usize::MAX; | ^^^^^^^^^^^^^^^^^^^ attempt to compute `1_usize + usize::MAX`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:151:14 + --> $DIR/lint-overflowing-ops.rs:150:14 | LL | let _n = 1u8 - 5; | ^^^^^^^ attempt to compute `1_u8 - 5_u8`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:154:14 + --> $DIR/lint-overflowing-ops.rs:153:14 | LL | let _n = 1u16 - 5; | ^^^^^^^^ attempt to compute `1_u16 - 5_u16`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:157:14 + --> $DIR/lint-overflowing-ops.rs:156:14 | LL | let _n = 1u32 - 5; | ^^^^^^^^ attempt to compute `1_u32 - 5_u32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:160:14 + --> $DIR/lint-overflowing-ops.rs:159:14 | LL | let _n = 1u64 - 5 ; | ^^^^^^^^ attempt to compute `1_u64 - 5_u64`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:163:14 + --> $DIR/lint-overflowing-ops.rs:162:14 | LL | let _n = 1u128 - 5 ; | ^^^^^^^^^ attempt to compute `1_u128 - 5_u128`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:166:14 + --> $DIR/lint-overflowing-ops.rs:165:14 | LL | let _n = -5i8 - i8::MAX; | ^^^^^^^^^^^^^^ attempt to compute `-5_i8 - i8::MAX`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:169:14 + --> $DIR/lint-overflowing-ops.rs:168:14 | LL | let _n = -5i16 - i16::MAX; | ^^^^^^^^^^^^^^^^ attempt to compute `-5_i16 - i16::MAX`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:172:14 + --> $DIR/lint-overflowing-ops.rs:171:14 | LL | let _n = -5i32 - i32::MAX; | ^^^^^^^^^^^^^^^^ attempt to compute `-5_i32 - i32::MAX`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:175:14 + --> $DIR/lint-overflowing-ops.rs:174:14 | LL | let _n = -5i64 - i64::MAX; | ^^^^^^^^^^^^^^^^ attempt to compute `-5_i64 - i64::MAX`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:178:14 + --> $DIR/lint-overflowing-ops.rs:177:14 | LL | let _n = -5i128 - i128::MAX; | ^^^^^^^^^^^^^^^^^^ attempt to compute `-5_i128 - i128::MAX`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:181:14 + --> $DIR/lint-overflowing-ops.rs:180:14 | LL | let _n = -5isize - isize::MAX; | ^^^^^^^^^^^^^^^^^^^^ attempt to compute `-5_isize - isize::MAX`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:184:14 + --> $DIR/lint-overflowing-ops.rs:183:14 | LL | let _n = 1usize - 5; | ^^^^^^^^^^ attempt to compute `1_usize - 5_usize`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:187:14 + --> $DIR/lint-overflowing-ops.rs:186:14 | LL | let _n = -i8::MIN; | ^^^^^^^^ attempt to negate `i8::MIN`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:192:14 + --> $DIR/lint-overflowing-ops.rs:191:14 | LL | let _n = u8::MAX * 5; | ^^^^^^^^^^^ attempt to compute `u8::MAX * 5_u8`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:195:14 + --> $DIR/lint-overflowing-ops.rs:194:14 | LL | let _n = u16::MAX * 5; | ^^^^^^^^^^^^ attempt to compute `u16::MAX * 5_u16`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:198:14 + --> $DIR/lint-overflowing-ops.rs:197:14 | LL | let _n = u32::MAX * 5; | ^^^^^^^^^^^^ attempt to compute `u32::MAX * 5_u32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:201:14 + --> $DIR/lint-overflowing-ops.rs:200:14 | LL | let _n = u64::MAX * 5; | ^^^^^^^^^^^^ attempt to compute `u64::MAX * 5_u64`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:204:14 + --> $DIR/lint-overflowing-ops.rs:203:14 | LL | let _n = u128::MAX * 5; | ^^^^^^^^^^^^^ attempt to compute `u128::MAX * 5_u128`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:207:14 + --> $DIR/lint-overflowing-ops.rs:206:14 | LL | let _n = usize::MAX * 5; | ^^^^^^^^^^^^^^ attempt to compute `usize::MAX * 5_usize`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:210:14 + --> $DIR/lint-overflowing-ops.rs:209:14 | LL | let _n = i8::MAX * i8::MAX; | ^^^^^^^^^^^^^^^^^ attempt to compute `i8::MAX * i8::MAX`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:213:14 + --> $DIR/lint-overflowing-ops.rs:212:14 | LL | let _n = i16::MAX * 5; | ^^^^^^^^^^^^ attempt to compute `i16::MAX * 5_i16`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:216:14 + --> $DIR/lint-overflowing-ops.rs:215:14 | LL | let _n = i32::MAX * 5; | ^^^^^^^^^^^^ attempt to compute `i32::MAX * 5_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:219:14 + --> $DIR/lint-overflowing-ops.rs:218:14 | LL | let _n = i64::MAX * 5; | ^^^^^^^^^^^^ attempt to compute `i64::MAX * 5_i64`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:222:14 + --> $DIR/lint-overflowing-ops.rs:221:14 | LL | let _n = i128::MAX * 5; | ^^^^^^^^^^^^^ attempt to compute `i128::MAX * 5_i128`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:225:14 + --> $DIR/lint-overflowing-ops.rs:224:14 | LL | let _n = isize::MAX * 5; | ^^^^^^^^^^^^^^ attempt to compute `isize::MAX * 5_isize`, which would overflow error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:230:14 + --> $DIR/lint-overflowing-ops.rs:229:14 | LL | let _n = 1u8 / 0; | ^^^^^^^ attempt to divide `1_u8` by zero @@ -787,439 +787,439 @@ LL | let _n = 1u8 / 0; = note: `#[deny(unconditional_panic)]` on by default error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:231:15 + --> $DIR/lint-overflowing-ops.rs:230:15 | LL | let _n = &(1u8 / 0); | ^^^^^^^^^ attempt to divide `1_u8` by zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:233:14 + --> $DIR/lint-overflowing-ops.rs:232:14 | LL | let _n = 1u16 / 0; | ^^^^^^^^ attempt to divide `1_u16` by zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:234:15 + --> $DIR/lint-overflowing-ops.rs:233:15 | LL | let _n = &(1u16 / 0); | ^^^^^^^^^^ attempt to divide `1_u16` by zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:236:14 + --> $DIR/lint-overflowing-ops.rs:235:14 | LL | let _n = 1u32 / 0; | ^^^^^^^^ attempt to divide `1_u32` by zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:237:15 + --> $DIR/lint-overflowing-ops.rs:236:15 | LL | let _n = &(1u32 / 0); | ^^^^^^^^^^ attempt to divide `1_u32` by zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:239:14 + --> $DIR/lint-overflowing-ops.rs:238:14 | LL | let _n = 1u64 / 0; | ^^^^^^^^ attempt to divide `1_u64` by zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:240:15 + --> $DIR/lint-overflowing-ops.rs:239:15 | LL | let _n = &(1u64 / 0); | ^^^^^^^^^^ attempt to divide `1_u64` by zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:242:14 + --> $DIR/lint-overflowing-ops.rs:241:14 | LL | let _n = 1u128 / 0; | ^^^^^^^^^ attempt to divide `1_u128` by zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:243:15 + --> $DIR/lint-overflowing-ops.rs:242:15 | LL | let _n = &(1u128 / 0); | ^^^^^^^^^^^ attempt to divide `1_u128` by zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:245:14 + --> $DIR/lint-overflowing-ops.rs:244:14 | LL | let _n = 1usize / 0; | ^^^^^^^^^^ attempt to divide `1_usize` by zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:246:15 + --> $DIR/lint-overflowing-ops.rs:245:15 | LL | let _n = &(1usize / 0); | ^^^^^^^^^^^^ attempt to divide `1_usize` by zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:248:14 + --> $DIR/lint-overflowing-ops.rs:247:14 | LL | let _n = 1i8 / 0; | ^^^^^^^ attempt to divide `1_i8` by zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:249:15 + --> $DIR/lint-overflowing-ops.rs:248:15 | LL | let _n = &(1i8 / 0); | ^^^^^^^^^ attempt to divide `1_i8` by zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:250:14 + --> $DIR/lint-overflowing-ops.rs:249:14 | LL | let _n = i8::MIN / -1; | ^^^^^^^^^^^^ attempt to compute `i8::MIN / -1_i8`, which would overflow error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:251:15 + --> $DIR/lint-overflowing-ops.rs:250:15 | LL | let _n = &(i8::MIN / -1); | ^^^^^^^^^^^^^^ attempt to compute `i8::MIN / -1_i8`, which would overflow error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:253:14 + --> $DIR/lint-overflowing-ops.rs:252:14 | LL | let _n = 1i16 / 0; | ^^^^^^^^ attempt to divide `1_i16` by zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:254:15 + --> $DIR/lint-overflowing-ops.rs:253:15 | LL | let _n = &(1i16 / 0); | ^^^^^^^^^^ attempt to divide `1_i16` by zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:255:14 + --> $DIR/lint-overflowing-ops.rs:254:14 | LL | let _n = i16::MIN / -1; | ^^^^^^^^^^^^^ attempt to compute `i16::MIN / -1_i16`, which would overflow error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:256:15 + --> $DIR/lint-overflowing-ops.rs:255:15 | LL | let _n = &(i16::MIN / -1); | ^^^^^^^^^^^^^^^ attempt to compute `i16::MIN / -1_i16`, which would overflow error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:258:14 + --> $DIR/lint-overflowing-ops.rs:257:14 | LL | let _n = 1i32 / 0; | ^^^^^^^^ attempt to divide `1_i32` by zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:259:15 + --> $DIR/lint-overflowing-ops.rs:258:15 | LL | let _n = &(1i32 / 0); | ^^^^^^^^^^ attempt to divide `1_i32` by zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:260:14 + --> $DIR/lint-overflowing-ops.rs:259:14 | LL | let _n = i32::MIN / -1; | ^^^^^^^^^^^^^ attempt to compute `i32::MIN / -1_i32`, which would overflow error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:261:15 + --> $DIR/lint-overflowing-ops.rs:260:15 | LL | let _n = &(i32::MIN / -1); | ^^^^^^^^^^^^^^^ attempt to compute `i32::MIN / -1_i32`, which would overflow error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:263:14 + --> $DIR/lint-overflowing-ops.rs:262:14 | LL | let _n = 1i64 / 0; | ^^^^^^^^ attempt to divide `1_i64` by zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:264:15 + --> $DIR/lint-overflowing-ops.rs:263:15 | LL | let _n = &(1i64 / 0); | ^^^^^^^^^^ attempt to divide `1_i64` by zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:265:14 + --> $DIR/lint-overflowing-ops.rs:264:14 | LL | let _n = i64::MIN / -1; | ^^^^^^^^^^^^^ attempt to compute `i64::MIN / -1_i64`, which would overflow error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:266:15 + --> $DIR/lint-overflowing-ops.rs:265:15 | LL | let _n = &(i64::MIN / -1); | ^^^^^^^^^^^^^^^ attempt to compute `i64::MIN / -1_i64`, which would overflow error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:268:14 + --> $DIR/lint-overflowing-ops.rs:267:14 | LL | let _n = 1i128 / 0; | ^^^^^^^^^ attempt to divide `1_i128` by zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:269:15 + --> $DIR/lint-overflowing-ops.rs:268:15 | LL | let _n = &(1i128 / 0); | ^^^^^^^^^^^ attempt to divide `1_i128` by zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:270:14 + --> $DIR/lint-overflowing-ops.rs:269:14 | LL | let _n = i128::MIN / -1; | ^^^^^^^^^^^^^^ attempt to compute `i128::MIN / -1_i128`, which would overflow error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:271:15 + --> $DIR/lint-overflowing-ops.rs:270:15 | LL | let _n = &(i128::MIN / -1); | ^^^^^^^^^^^^^^^^ attempt to compute `i128::MIN / -1_i128`, which would overflow error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:273:14 + --> $DIR/lint-overflowing-ops.rs:272:14 | LL | let _n = 1isize / 0; | ^^^^^^^^^^ attempt to divide `1_isize` by zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:274:15 + --> $DIR/lint-overflowing-ops.rs:273:15 | LL | let _n = &(1isize / 0); | ^^^^^^^^^^^^ attempt to divide `1_isize` by zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:275:14 + --> $DIR/lint-overflowing-ops.rs:274:14 | LL | let _n = isize::MIN / -1; | ^^^^^^^^^^^^^^^ attempt to compute `isize::MIN / -1_isize`, which would overflow error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:276:15 + --> $DIR/lint-overflowing-ops.rs:275:15 | LL | let _n = &(isize::MIN / -1); | ^^^^^^^^^^^^^^^^^ attempt to compute `isize::MIN / -1_isize`, which would overflow error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:280:14 + --> $DIR/lint-overflowing-ops.rs:279:14 | LL | let _n = 1u8 % 0; | ^^^^^^^ attempt to calculate the remainder of `1_u8` with a divisor of zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:281:15 + --> $DIR/lint-overflowing-ops.rs:280:15 | LL | let _n = &(1u8 % 0); | ^^^^^^^^^ attempt to calculate the remainder of `1_u8` with a divisor of zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:283:14 + --> $DIR/lint-overflowing-ops.rs:282:14 | LL | let _n = 1u16 % 0; | ^^^^^^^^ attempt to calculate the remainder of `1_u16` with a divisor of zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:284:15 + --> $DIR/lint-overflowing-ops.rs:283:15 | LL | let _n = &(1u16 % 0); | ^^^^^^^^^^ attempt to calculate the remainder of `1_u16` with a divisor of zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:286:14 + --> $DIR/lint-overflowing-ops.rs:285:14 | LL | let _n = 1u32 % 0; | ^^^^^^^^ attempt to calculate the remainder of `1_u32` with a divisor of zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:287:15 + --> $DIR/lint-overflowing-ops.rs:286:15 | LL | let _n = &(1u32 % 0); | ^^^^^^^^^^ attempt to calculate the remainder of `1_u32` with a divisor of zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:289:14 + --> $DIR/lint-overflowing-ops.rs:288:14 | LL | let _n = 1u64 % 0; | ^^^^^^^^ attempt to calculate the remainder of `1_u64` with a divisor of zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:290:15 + --> $DIR/lint-overflowing-ops.rs:289:15 | LL | let _n = &(1u64 % 0); | ^^^^^^^^^^ attempt to calculate the remainder of `1_u64` with a divisor of zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:292:14 + --> $DIR/lint-overflowing-ops.rs:291:14 | LL | let _n = 1u128 % 0; | ^^^^^^^^^ attempt to calculate the remainder of `1_u128` with a divisor of zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:293:15 + --> $DIR/lint-overflowing-ops.rs:292:15 | LL | let _n = &(1u128 % 0); | ^^^^^^^^^^^ attempt to calculate the remainder of `1_u128` with a divisor of zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:295:14 + --> $DIR/lint-overflowing-ops.rs:294:14 | LL | let _n = 1usize % 0; | ^^^^^^^^^^ attempt to calculate the remainder of `1_usize` with a divisor of zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:296:15 + --> $DIR/lint-overflowing-ops.rs:295:15 | LL | let _n = &(1usize % 0); | ^^^^^^^^^^^^ attempt to calculate the remainder of `1_usize` with a divisor of zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:298:14 + --> $DIR/lint-overflowing-ops.rs:297:14 | LL | let _n = 1i8 % 0; | ^^^^^^^ attempt to calculate the remainder of `1_i8` with a divisor of zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:299:15 + --> $DIR/lint-overflowing-ops.rs:298:15 | LL | let _n = &(1i8 % 0); | ^^^^^^^^^ attempt to calculate the remainder of `1_i8` with a divisor of zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:300:14 + --> $DIR/lint-overflowing-ops.rs:299:14 | LL | let _n = i8::MIN % -1; | ^^^^^^^^^^^^ attempt to compute `i8::MIN % -1_i8`, which would overflow error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:301:15 + --> $DIR/lint-overflowing-ops.rs:300:15 | LL | let _n = &(i8::MIN % -1); | ^^^^^^^^^^^^^^ attempt to compute `i8::MIN % -1_i8`, which would overflow error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:303:14 + --> $DIR/lint-overflowing-ops.rs:302:14 | LL | let _n = 1i16 % 0; | ^^^^^^^^ attempt to calculate the remainder of `1_i16` with a divisor of zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:304:15 + --> $DIR/lint-overflowing-ops.rs:303:15 | LL | let _n = &(1i16 % 0); | ^^^^^^^^^^ attempt to calculate the remainder of `1_i16` with a divisor of zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:305:14 + --> $DIR/lint-overflowing-ops.rs:304:14 | LL | let _n = i16::MIN % -1; | ^^^^^^^^^^^^^ attempt to compute `i16::MIN % -1_i16`, which would overflow error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:306:15 + --> $DIR/lint-overflowing-ops.rs:305:15 | LL | let _n = &(i16::MIN % -1); | ^^^^^^^^^^^^^^^ attempt to compute `i16::MIN % -1_i16`, which would overflow error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:308:14 + --> $DIR/lint-overflowing-ops.rs:307:14 | LL | let _n = 1i32 % 0; | ^^^^^^^^ attempt to calculate the remainder of `1_i32` with a divisor of zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:309:15 + --> $DIR/lint-overflowing-ops.rs:308:15 | LL | let _n = &(1i32 % 0); | ^^^^^^^^^^ attempt to calculate the remainder of `1_i32` with a divisor of zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:310:14 + --> $DIR/lint-overflowing-ops.rs:309:14 | LL | let _n = i32::MIN % -1; | ^^^^^^^^^^^^^ attempt to compute `i32::MIN % -1_i32`, which would overflow error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:311:15 + --> $DIR/lint-overflowing-ops.rs:310:15 | LL | let _n = &(i32::MIN % -1); | ^^^^^^^^^^^^^^^ attempt to compute `i32::MIN % -1_i32`, which would overflow error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:313:14 + --> $DIR/lint-overflowing-ops.rs:312:14 | LL | let _n = 1i64 % 0; | ^^^^^^^^ attempt to calculate the remainder of `1_i64` with a divisor of zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:314:15 + --> $DIR/lint-overflowing-ops.rs:313:15 | LL | let _n = &(1i64 % 0); | ^^^^^^^^^^ attempt to calculate the remainder of `1_i64` with a divisor of zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:315:14 + --> $DIR/lint-overflowing-ops.rs:314:14 | LL | let _n = i64::MIN % -1; | ^^^^^^^^^^^^^ attempt to compute `i64::MIN % -1_i64`, which would overflow error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:316:15 + --> $DIR/lint-overflowing-ops.rs:315:15 | LL | let _n = &(i64::MIN % -1); | ^^^^^^^^^^^^^^^ attempt to compute `i64::MIN % -1_i64`, which would overflow error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:318:14 + --> $DIR/lint-overflowing-ops.rs:317:14 | LL | let _n = 1i128 % 0; | ^^^^^^^^^ attempt to calculate the remainder of `1_i128` with a divisor of zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:319:15 + --> $DIR/lint-overflowing-ops.rs:318:15 | LL | let _n = &(1i128 % 0); | ^^^^^^^^^^^ attempt to calculate the remainder of `1_i128` with a divisor of zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:320:14 + --> $DIR/lint-overflowing-ops.rs:319:14 | LL | let _n = i128::MIN % -1; | ^^^^^^^^^^^^^^ attempt to compute `i128::MIN % -1_i128`, which would overflow error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:321:15 + --> $DIR/lint-overflowing-ops.rs:320:15 | LL | let _n = &(i128::MIN % -1); | ^^^^^^^^^^^^^^^^ attempt to compute `i128::MIN % -1_i128`, which would overflow error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:323:14 + --> $DIR/lint-overflowing-ops.rs:322:14 | LL | let _n = 1isize % 0; | ^^^^^^^^^^ attempt to calculate the remainder of `1_isize` with a divisor of zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:324:15 + --> $DIR/lint-overflowing-ops.rs:323:15 | LL | let _n = &(1isize % 0); | ^^^^^^^^^^^^ attempt to calculate the remainder of `1_isize` with a divisor of zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:325:14 + --> $DIR/lint-overflowing-ops.rs:324:14 | LL | let _n = isize::MIN % -1; | ^^^^^^^^^^^^^^^ attempt to compute `isize::MIN % -1_isize`, which would overflow error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:326:15 + --> $DIR/lint-overflowing-ops.rs:325:15 | LL | let _n = &(isize::MIN % -1); | ^^^^^^^^^^^^^^^^^ attempt to compute `isize::MIN % -1_isize`, which would overflow error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:329:14 + --> $DIR/lint-overflowing-ops.rs:328:14 | LL | let _n = [1, 2, 3][4]; | ^^^^^^^^^^^^ index out of bounds: the length is 3 but the index is 4 error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:330:15 + --> $DIR/lint-overflowing-ops.rs:329:15 | LL | let _n = &([1, 2, 3][4]); | ^^^^^^^^^^^^^^ index out of bounds: the length is 3 but the index is 4 diff --git a/tests/ui/lint/lint-overflowing-ops.opt_with_overflow_checks.stderr b/tests/ui/lint/lint-overflowing-ops.opt_with_overflow_checks.stderr index 1b7b73cec38d5..6c34405c5efd0 100644 --- a/tests/ui/lint/lint-overflowing-ops.opt_with_overflow_checks.stderr +++ b/tests/ui/lint/lint-overflowing-ops.opt_with_overflow_checks.stderr @@ -1,785 +1,785 @@ error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:28:14 + --> $DIR/lint-overflowing-ops.rs:27:14 | LL | let _n = 1u8 << 8; | ^^^^^^^^ attempt to shift left by `8_i32`, which would overflow | note: the lint level is defined here - --> $DIR/lint-overflowing-ops.rs:17:9 + --> $DIR/lint-overflowing-ops.rs:16:9 | LL | #![deny(arithmetic_overflow)] | ^^^^^^^^^^^^^^^^^^^ error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:226:15 + --> $DIR/lint-overflowing-ops.rs:225:15 | LL | let _n = &(isize::MAX * 5); | ^^^^^^^^^^^^^^^^ attempt to compute `isize::MAX * 5_isize`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:223:15 + --> $DIR/lint-overflowing-ops.rs:222:15 | LL | let _n = &(i128::MAX * 5); | ^^^^^^^^^^^^^^^ attempt to compute `i128::MAX * 5_i128`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:220:15 + --> $DIR/lint-overflowing-ops.rs:219:15 | LL | let _n = &(i64::MAX * 5); | ^^^^^^^^^^^^^^ attempt to compute `i64::MAX * 5_i64`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:217:15 + --> $DIR/lint-overflowing-ops.rs:216:15 | LL | let _n = &(i32::MAX * 5); | ^^^^^^^^^^^^^^ attempt to compute `i32::MAX * 5_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:214:15 + --> $DIR/lint-overflowing-ops.rs:213:15 | LL | let _n = &(i16::MAX * 5); | ^^^^^^^^^^^^^^ attempt to compute `i16::MAX * 5_i16`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:211:15 + --> $DIR/lint-overflowing-ops.rs:210:15 | LL | let _n = &(i8::MAX * i8::MAX); | ^^^^^^^^^^^^^^^^^^^ attempt to compute `i8::MAX * i8::MAX`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:208:15 + --> $DIR/lint-overflowing-ops.rs:207:15 | LL | let _n = &(usize::MAX * 5); | ^^^^^^^^^^^^^^^^ attempt to compute `usize::MAX * 5_usize`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:205:15 + --> $DIR/lint-overflowing-ops.rs:204:15 | LL | let _n = &(u128::MAX * 5); | ^^^^^^^^^^^^^^^ attempt to compute `u128::MAX * 5_u128`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:202:15 + --> $DIR/lint-overflowing-ops.rs:201:15 | LL | let _n = &(u64::MAX * 5); | ^^^^^^^^^^^^^^ attempt to compute `u64::MAX * 5_u64`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:199:15 + --> $DIR/lint-overflowing-ops.rs:198:15 | LL | let _n = &(u32::MAX * 5); | ^^^^^^^^^^^^^^ attempt to compute `u32::MAX * 5_u32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:196:15 + --> $DIR/lint-overflowing-ops.rs:195:15 | LL | let _n = &(u16::MAX * 5); | ^^^^^^^^^^^^^^ attempt to compute `u16::MAX * 5_u16`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:193:15 + --> $DIR/lint-overflowing-ops.rs:192:15 | LL | let _n = &(u8::MAX * 5); | ^^^^^^^^^^^^^ attempt to compute `u8::MAX * 5_u8`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:188:15 + --> $DIR/lint-overflowing-ops.rs:187:15 | LL | let _n = &(-i8::MIN); | ^^^^^^^^^^ attempt to negate `i8::MIN`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:185:15 + --> $DIR/lint-overflowing-ops.rs:184:15 | LL | let _n = &(1usize - 5); | ^^^^^^^^^^^^ attempt to compute `1_usize - 5_usize`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:182:15 + --> $DIR/lint-overflowing-ops.rs:181:15 | LL | let _n = &(-5isize - isize::MAX); | ^^^^^^^^^^^^^^^^^^^^^^ attempt to compute `-5_isize - isize::MAX`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:179:15 + --> $DIR/lint-overflowing-ops.rs:178:15 | LL | let _n = &(-5i128 - i128::MAX); | ^^^^^^^^^^^^^^^^^^^^ attempt to compute `-5_i128 - i128::MAX`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:176:15 + --> $DIR/lint-overflowing-ops.rs:175:15 | LL | let _n = &(-5i64 - i64::MAX); | ^^^^^^^^^^^^^^^^^^ attempt to compute `-5_i64 - i64::MAX`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:173:15 + --> $DIR/lint-overflowing-ops.rs:172:15 | LL | let _n = &(-5i32 - i32::MAX); | ^^^^^^^^^^^^^^^^^^ attempt to compute `-5_i32 - i32::MAX`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:170:15 + --> $DIR/lint-overflowing-ops.rs:169:15 | LL | let _n = &(-5i16 - i16::MAX); | ^^^^^^^^^^^^^^^^^^ attempt to compute `-5_i16 - i16::MAX`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:167:15 + --> $DIR/lint-overflowing-ops.rs:166:15 | LL | let _n = &(-5i8 - i8::MAX); | ^^^^^^^^^^^^^^^^ attempt to compute `-5_i8 - i8::MAX`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:164:15 + --> $DIR/lint-overflowing-ops.rs:163:15 | LL | let _n = &(1u128 - 5); | ^^^^^^^^^^^ attempt to compute `1_u128 - 5_u128`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:161:15 + --> $DIR/lint-overflowing-ops.rs:160:15 | LL | let _n = &(1u64 - 5); | ^^^^^^^^^^ attempt to compute `1_u64 - 5_u64`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:158:15 + --> $DIR/lint-overflowing-ops.rs:157:15 | LL | let _n = &(1u32 - 5); | ^^^^^^^^^^ attempt to compute `1_u32 - 5_u32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:155:15 + --> $DIR/lint-overflowing-ops.rs:154:15 | LL | let _n = &(1u16 - 5); | ^^^^^^^^^^ attempt to compute `1_u16 - 5_u16`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:152:15 + --> $DIR/lint-overflowing-ops.rs:151:15 | LL | let _n = &(1u8 - 5); | ^^^^^^^^^ attempt to compute `1_u8 - 5_u8`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:147:15 + --> $DIR/lint-overflowing-ops.rs:146:15 | LL | let _n = &(1usize + usize::MAX); | ^^^^^^^^^^^^^^^^^^^^^ attempt to compute `1_usize + usize::MAX`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:144:15 + --> $DIR/lint-overflowing-ops.rs:143:15 | LL | let _n = &(1isize + isize::MAX); | ^^^^^^^^^^^^^^^^^^^^^ attempt to compute `1_isize + isize::MAX`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:141:15 + --> $DIR/lint-overflowing-ops.rs:140:15 | LL | let _n = &(1i128 + i128::MAX); | ^^^^^^^^^^^^^^^^^^^ attempt to compute `1_i128 + i128::MAX`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:138:15 + --> $DIR/lint-overflowing-ops.rs:137:15 | LL | let _n = &(1i64 + i64::MAX); | ^^^^^^^^^^^^^^^^^ attempt to compute `1_i64 + i64::MAX`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:135:15 + --> $DIR/lint-overflowing-ops.rs:134:15 | LL | let _n = &(1i32 + i32::MAX); | ^^^^^^^^^^^^^^^^^ attempt to compute `1_i32 + i32::MAX`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:132:15 + --> $DIR/lint-overflowing-ops.rs:131:15 | LL | let _n = &(1i16 + i16::MAX); | ^^^^^^^^^^^^^^^^^ attempt to compute `1_i16 + i16::MAX`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:129:15 + --> $DIR/lint-overflowing-ops.rs:128:15 | LL | let _n = &(1i8 + i8::MAX); | ^^^^^^^^^^^^^^^ attempt to compute `1_i8 + i8::MAX`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:126:15 + --> $DIR/lint-overflowing-ops.rs:125:15 | LL | let _n = &(1u128 + u128::MAX); | ^^^^^^^^^^^^^^^^^^^ attempt to compute `1_u128 + u128::MAX`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:123:15 + --> $DIR/lint-overflowing-ops.rs:122:15 | LL | let _n = &(1u64 + u64::MAX); | ^^^^^^^^^^^^^^^^^ attempt to compute `1_u64 + u64::MAX`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:120:15 + --> $DIR/lint-overflowing-ops.rs:119:15 | LL | let _n = &(1u32 + u32::MAX); | ^^^^^^^^^^^^^^^^^ attempt to compute `1_u32 + u32::MAX`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:117:15 + --> $DIR/lint-overflowing-ops.rs:116:15 | LL | let _n = &(1u16 + u16::MAX); | ^^^^^^^^^^^^^^^^^ attempt to compute `1_u16 + u16::MAX`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:114:15 + --> $DIR/lint-overflowing-ops.rs:113:15 | LL | let _n = &(1u8 + u8::MAX); | ^^^^^^^^^^^^^^^ attempt to compute `1_u8 + u8::MAX`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:110:15 + --> $DIR/lint-overflowing-ops.rs:109:15 | LL | let _n = &(1i64 >> [64][0]); | ^^^^^^^^^^^^^^^^^ attempt to shift right by `64_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:107:15 + --> $DIR/lint-overflowing-ops.rs:106:15 | LL | let _n = &(1_usize >> BITS); | ^^^^^^^^^^^^^^^^^ attempt to shift right by `%BITS%`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:104:15 + --> $DIR/lint-overflowing-ops.rs:103:15 | LL | let _n = &(1_isize >> BITS); | ^^^^^^^^^^^^^^^^^ attempt to shift right by `%BITS%`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:101:15 + --> $DIR/lint-overflowing-ops.rs:100:15 | LL | let _n = &(1i128 >> 128); | ^^^^^^^^^^^^^^ attempt to shift right by `128_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:98:15 + --> $DIR/lint-overflowing-ops.rs:97:15 | LL | let _n = &(1i64 >> 64); | ^^^^^^^^^^^^ attempt to shift right by `64_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:95:15 + --> $DIR/lint-overflowing-ops.rs:94:15 | LL | let _n = &(1i32 >> 32); | ^^^^^^^^^^^^ attempt to shift right by `32_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:92:15 + --> $DIR/lint-overflowing-ops.rs:91:15 | LL | let _n = &(1i16 >> 16); | ^^^^^^^^^^^^ attempt to shift right by `16_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:89:15 + --> $DIR/lint-overflowing-ops.rs:88:15 | LL | let _n = &(1i8 >> 8); | ^^^^^^^^^^ attempt to shift right by `8_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:86:15 + --> $DIR/lint-overflowing-ops.rs:85:15 | LL | let _n = &(1u128 >> 128); | ^^^^^^^^^^^^^^ attempt to shift right by `128_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:83:15 + --> $DIR/lint-overflowing-ops.rs:82:15 | LL | let _n = &(1u64 >> 64); | ^^^^^^^^^^^^ attempt to shift right by `64_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:80:15 + --> $DIR/lint-overflowing-ops.rs:79:15 | LL | let _n = &(1u32 >> 32); | ^^^^^^^^^^^^ attempt to shift right by `32_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:77:15 + --> $DIR/lint-overflowing-ops.rs:76:15 | LL | let _n = &(1u16 >> 16); | ^^^^^^^^^^^^ attempt to shift right by `16_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:74:15 + --> $DIR/lint-overflowing-ops.rs:73:15 | LL | let _n = &(1u8 >> 8); | ^^^^^^^^^^ attempt to shift right by `8_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:65:15 + --> $DIR/lint-overflowing-ops.rs:64:15 | LL | let _n = &(1 << -1); | ^^^^^^^^^ attempt to shift left by `-1_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:62:15 + --> $DIR/lint-overflowing-ops.rs:61:15 | LL | let _n = &(1_usize << BITS); | ^^^^^^^^^^^^^^^^^ attempt to shift left by `%BITS%`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:59:15 + --> $DIR/lint-overflowing-ops.rs:58:15 | LL | let _n = &(1_isize << BITS); | ^^^^^^^^^^^^^^^^^ attempt to shift left by `%BITS%`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:56:15 + --> $DIR/lint-overflowing-ops.rs:55:15 | LL | let _n = &(1i128 << 128); | ^^^^^^^^^^^^^^ attempt to shift left by `128_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:53:15 + --> $DIR/lint-overflowing-ops.rs:52:15 | LL | let _n = &(1i64 << 64); | ^^^^^^^^^^^^ attempt to shift left by `64_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:50:15 + --> $DIR/lint-overflowing-ops.rs:49:15 | LL | let _n = &(1i32 << 32); | ^^^^^^^^^^^^ attempt to shift left by `32_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:47:15 + --> $DIR/lint-overflowing-ops.rs:46:15 | LL | let _n = &(1i16 << 16); | ^^^^^^^^^^^^ attempt to shift left by `16_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:44:15 + --> $DIR/lint-overflowing-ops.rs:43:15 | LL | let _n = &(1i8 << 8); | ^^^^^^^^^^ attempt to shift left by `8_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:41:15 + --> $DIR/lint-overflowing-ops.rs:40:15 | LL | let _n = &(1u128 << 128); | ^^^^^^^^^^^^^^ attempt to shift left by `128_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:38:15 + --> $DIR/lint-overflowing-ops.rs:37:15 | LL | let _n = &(1u64 << 64); | ^^^^^^^^^^^^ attempt to shift left by `64_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:35:15 + --> $DIR/lint-overflowing-ops.rs:34:15 | LL | let _n = &(1u32 << 32); | ^^^^^^^^^^^^ attempt to shift left by `32_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:32:15 + --> $DIR/lint-overflowing-ops.rs:31:15 | LL | let _n = &(1u16 << 16); | ^^^^^^^^^^^^ attempt to shift left by `16_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:29:15 + --> $DIR/lint-overflowing-ops.rs:28:15 | LL | let _n = &(1u8 << 8); | ^^^^^^^^^^ attempt to shift left by `8_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:31:14 + --> $DIR/lint-overflowing-ops.rs:30:14 | LL | let _n = 1u16 << 16; | ^^^^^^^^^^ attempt to shift left by `16_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:34:14 + --> $DIR/lint-overflowing-ops.rs:33:14 | LL | let _n = 1u32 << 32; | ^^^^^^^^^^ attempt to shift left by `32_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:37:14 + --> $DIR/lint-overflowing-ops.rs:36:14 | LL | let _n = 1u64 << 64; | ^^^^^^^^^^ attempt to shift left by `64_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:40:14 + --> $DIR/lint-overflowing-ops.rs:39:14 | LL | let _n = 1u128 << 128; | ^^^^^^^^^^^^ attempt to shift left by `128_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:43:14 + --> $DIR/lint-overflowing-ops.rs:42:14 | LL | let _n = 1i8 << 8; | ^^^^^^^^ attempt to shift left by `8_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:46:14 + --> $DIR/lint-overflowing-ops.rs:45:14 | LL | let _n = 1i16 << 16; | ^^^^^^^^^^ attempt to shift left by `16_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:49:14 + --> $DIR/lint-overflowing-ops.rs:48:14 | LL | let _n = 1i32 << 32; | ^^^^^^^^^^ attempt to shift left by `32_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:52:14 + --> $DIR/lint-overflowing-ops.rs:51:14 | LL | let _n = 1i64 << 64; | ^^^^^^^^^^ attempt to shift left by `64_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:55:14 + --> $DIR/lint-overflowing-ops.rs:54:14 | LL | let _n = 1i128 << 128; | ^^^^^^^^^^^^ attempt to shift left by `128_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:58:14 + --> $DIR/lint-overflowing-ops.rs:57:14 | LL | let _n = 1_isize << BITS; | ^^^^^^^^^^^^^^^ attempt to shift left by `%BITS%`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:61:14 + --> $DIR/lint-overflowing-ops.rs:60:14 | LL | let _n = 1_usize << BITS; | ^^^^^^^^^^^^^^^ attempt to shift left by `%BITS%`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:64:14 + --> $DIR/lint-overflowing-ops.rs:63:14 | LL | let _n = 1 << -1; | ^^^^^^^ attempt to shift left by `-1_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:69:14 + --> $DIR/lint-overflowing-ops.rs:68:14 | LL | let _n = -1_i64 >> 64; | ^^^^^^^^^^^^ attempt to shift right by `64_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:70:14 + --> $DIR/lint-overflowing-ops.rs:69:14 | LL | let _n = -1_i32 >> 32; | ^^^^^^^^^^^^ attempt to shift right by `32_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:71:14 + --> $DIR/lint-overflowing-ops.rs:70:14 | LL | let _n = -1_i32 >> -1; | ^^^^^^^^^^^^ attempt to shift right by `-1_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:73:14 + --> $DIR/lint-overflowing-ops.rs:72:14 | LL | let _n = 1u8 >> 8; | ^^^^^^^^ attempt to shift right by `8_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:76:14 + --> $DIR/lint-overflowing-ops.rs:75:14 | LL | let _n = 1u16 >> 16; | ^^^^^^^^^^ attempt to shift right by `16_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:79:14 + --> $DIR/lint-overflowing-ops.rs:78:14 | LL | let _n = 1u32 >> 32; | ^^^^^^^^^^ attempt to shift right by `32_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:82:14 + --> $DIR/lint-overflowing-ops.rs:81:14 | LL | let _n = 1u64 >> 64; | ^^^^^^^^^^ attempt to shift right by `64_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:85:14 + --> $DIR/lint-overflowing-ops.rs:84:14 | LL | let _n = 1u128 >> 128; | ^^^^^^^^^^^^ attempt to shift right by `128_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:88:14 + --> $DIR/lint-overflowing-ops.rs:87:14 | LL | let _n = 1i8 >> 8; | ^^^^^^^^ attempt to shift right by `8_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:91:14 + --> $DIR/lint-overflowing-ops.rs:90:14 | LL | let _n = 1i16 >> 16; | ^^^^^^^^^^ attempt to shift right by `16_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:94:14 + --> $DIR/lint-overflowing-ops.rs:93:14 | LL | let _n = 1i32 >> 32; | ^^^^^^^^^^ attempt to shift right by `32_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:97:14 + --> $DIR/lint-overflowing-ops.rs:96:14 | LL | let _n = 1i64 >> 64; | ^^^^^^^^^^ attempt to shift right by `64_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:100:14 + --> $DIR/lint-overflowing-ops.rs:99:14 | LL | let _n = 1i128 >> 128; | ^^^^^^^^^^^^ attempt to shift right by `128_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:103:14 + --> $DIR/lint-overflowing-ops.rs:102:14 | LL | let _n = 1_isize >> BITS; | ^^^^^^^^^^^^^^^ attempt to shift right by `%BITS%`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:106:14 + --> $DIR/lint-overflowing-ops.rs:105:14 | LL | let _n = 1_usize >> BITS; | ^^^^^^^^^^^^^^^ attempt to shift right by `%BITS%`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:109:14 + --> $DIR/lint-overflowing-ops.rs:108:14 | LL | let _n = 1i64 >> [64][0]; | ^^^^^^^^^^^^^^^ attempt to shift right by `64_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:113:14 + --> $DIR/lint-overflowing-ops.rs:112:14 | LL | let _n = 1u8 + u8::MAX; | ^^^^^^^^^^^^^ attempt to compute `1_u8 + u8::MAX`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:116:14 + --> $DIR/lint-overflowing-ops.rs:115:14 | LL | let _n = 1u16 + u16::MAX; | ^^^^^^^^^^^^^^^ attempt to compute `1_u16 + u16::MAX`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:119:14 + --> $DIR/lint-overflowing-ops.rs:118:14 | LL | let _n = 1u32 + u32::MAX; | ^^^^^^^^^^^^^^^ attempt to compute `1_u32 + u32::MAX`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:122:14 + --> $DIR/lint-overflowing-ops.rs:121:14 | LL | let _n = 1u64 + u64::MAX; | ^^^^^^^^^^^^^^^ attempt to compute `1_u64 + u64::MAX`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:125:14 + --> $DIR/lint-overflowing-ops.rs:124:14 | LL | let _n = 1u128 + u128::MAX; | ^^^^^^^^^^^^^^^^^ attempt to compute `1_u128 + u128::MAX`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:128:14 + --> $DIR/lint-overflowing-ops.rs:127:14 | LL | let _n = 1i8 + i8::MAX; | ^^^^^^^^^^^^^ attempt to compute `1_i8 + i8::MAX`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:131:14 + --> $DIR/lint-overflowing-ops.rs:130:14 | LL | let _n = 1i16 + i16::MAX; | ^^^^^^^^^^^^^^^ attempt to compute `1_i16 + i16::MAX`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:134:14 + --> $DIR/lint-overflowing-ops.rs:133:14 | LL | let _n = 1i32 + i32::MAX; | ^^^^^^^^^^^^^^^ attempt to compute `1_i32 + i32::MAX`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:137:14 + --> $DIR/lint-overflowing-ops.rs:136:14 | LL | let _n = 1i64 + i64::MAX; | ^^^^^^^^^^^^^^^ attempt to compute `1_i64 + i64::MAX`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:140:14 + --> $DIR/lint-overflowing-ops.rs:139:14 | LL | let _n = 1i128 + i128::MAX; | ^^^^^^^^^^^^^^^^^ attempt to compute `1_i128 + i128::MAX`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:143:14 + --> $DIR/lint-overflowing-ops.rs:142:14 | LL | let _n = 1isize + isize::MAX; | ^^^^^^^^^^^^^^^^^^^ attempt to compute `1_isize + isize::MAX`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:146:14 + --> $DIR/lint-overflowing-ops.rs:145:14 | LL | let _n = 1usize + usize::MAX; | ^^^^^^^^^^^^^^^^^^^ attempt to compute `1_usize + usize::MAX`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:151:14 + --> $DIR/lint-overflowing-ops.rs:150:14 | LL | let _n = 1u8 - 5; | ^^^^^^^ attempt to compute `1_u8 - 5_u8`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:154:14 + --> $DIR/lint-overflowing-ops.rs:153:14 | LL | let _n = 1u16 - 5; | ^^^^^^^^ attempt to compute `1_u16 - 5_u16`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:157:14 + --> $DIR/lint-overflowing-ops.rs:156:14 | LL | let _n = 1u32 - 5; | ^^^^^^^^ attempt to compute `1_u32 - 5_u32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:160:14 + --> $DIR/lint-overflowing-ops.rs:159:14 | LL | let _n = 1u64 - 5 ; | ^^^^^^^^ attempt to compute `1_u64 - 5_u64`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:163:14 + --> $DIR/lint-overflowing-ops.rs:162:14 | LL | let _n = 1u128 - 5 ; | ^^^^^^^^^ attempt to compute `1_u128 - 5_u128`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:166:14 + --> $DIR/lint-overflowing-ops.rs:165:14 | LL | let _n = -5i8 - i8::MAX; | ^^^^^^^^^^^^^^ attempt to compute `-5_i8 - i8::MAX`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:169:14 + --> $DIR/lint-overflowing-ops.rs:168:14 | LL | let _n = -5i16 - i16::MAX; | ^^^^^^^^^^^^^^^^ attempt to compute `-5_i16 - i16::MAX`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:172:14 + --> $DIR/lint-overflowing-ops.rs:171:14 | LL | let _n = -5i32 - i32::MAX; | ^^^^^^^^^^^^^^^^ attempt to compute `-5_i32 - i32::MAX`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:175:14 + --> $DIR/lint-overflowing-ops.rs:174:14 | LL | let _n = -5i64 - i64::MAX; | ^^^^^^^^^^^^^^^^ attempt to compute `-5_i64 - i64::MAX`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:178:14 + --> $DIR/lint-overflowing-ops.rs:177:14 | LL | let _n = -5i128 - i128::MAX; | ^^^^^^^^^^^^^^^^^^ attempt to compute `-5_i128 - i128::MAX`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:181:14 + --> $DIR/lint-overflowing-ops.rs:180:14 | LL | let _n = -5isize - isize::MAX; | ^^^^^^^^^^^^^^^^^^^^ attempt to compute `-5_isize - isize::MAX`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:184:14 + --> $DIR/lint-overflowing-ops.rs:183:14 | LL | let _n = 1usize - 5; | ^^^^^^^^^^ attempt to compute `1_usize - 5_usize`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:187:14 + --> $DIR/lint-overflowing-ops.rs:186:14 | LL | let _n = -i8::MIN; | ^^^^^^^^ attempt to negate `i8::MIN`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:192:14 + --> $DIR/lint-overflowing-ops.rs:191:14 | LL | let _n = u8::MAX * 5; | ^^^^^^^^^^^ attempt to compute `u8::MAX * 5_u8`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:195:14 + --> $DIR/lint-overflowing-ops.rs:194:14 | LL | let _n = u16::MAX * 5; | ^^^^^^^^^^^^ attempt to compute `u16::MAX * 5_u16`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:198:14 + --> $DIR/lint-overflowing-ops.rs:197:14 | LL | let _n = u32::MAX * 5; | ^^^^^^^^^^^^ attempt to compute `u32::MAX * 5_u32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:201:14 + --> $DIR/lint-overflowing-ops.rs:200:14 | LL | let _n = u64::MAX * 5; | ^^^^^^^^^^^^ attempt to compute `u64::MAX * 5_u64`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:204:14 + --> $DIR/lint-overflowing-ops.rs:203:14 | LL | let _n = u128::MAX * 5; | ^^^^^^^^^^^^^ attempt to compute `u128::MAX * 5_u128`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:207:14 + --> $DIR/lint-overflowing-ops.rs:206:14 | LL | let _n = usize::MAX * 5; | ^^^^^^^^^^^^^^ attempt to compute `usize::MAX * 5_usize`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:210:14 + --> $DIR/lint-overflowing-ops.rs:209:14 | LL | let _n = i8::MAX * i8::MAX; | ^^^^^^^^^^^^^^^^^ attempt to compute `i8::MAX * i8::MAX`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:213:14 + --> $DIR/lint-overflowing-ops.rs:212:14 | LL | let _n = i16::MAX * 5; | ^^^^^^^^^^^^ attempt to compute `i16::MAX * 5_i16`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:216:14 + --> $DIR/lint-overflowing-ops.rs:215:14 | LL | let _n = i32::MAX * 5; | ^^^^^^^^^^^^ attempt to compute `i32::MAX * 5_i32`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:219:14 + --> $DIR/lint-overflowing-ops.rs:218:14 | LL | let _n = i64::MAX * 5; | ^^^^^^^^^^^^ attempt to compute `i64::MAX * 5_i64`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:222:14 + --> $DIR/lint-overflowing-ops.rs:221:14 | LL | let _n = i128::MAX * 5; | ^^^^^^^^^^^^^ attempt to compute `i128::MAX * 5_i128`, which would overflow error: this arithmetic operation will overflow - --> $DIR/lint-overflowing-ops.rs:225:14 + --> $DIR/lint-overflowing-ops.rs:224:14 | LL | let _n = isize::MAX * 5; | ^^^^^^^^^^^^^^ attempt to compute `isize::MAX * 5_isize`, which would overflow error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:230:14 + --> $DIR/lint-overflowing-ops.rs:229:14 | LL | let _n = 1u8 / 0; | ^^^^^^^ attempt to divide `1_u8` by zero @@ -787,439 +787,439 @@ LL | let _n = 1u8 / 0; = note: `#[deny(unconditional_panic)]` on by default error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:231:15 + --> $DIR/lint-overflowing-ops.rs:230:15 | LL | let _n = &(1u8 / 0); | ^^^^^^^^^ attempt to divide `1_u8` by zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:233:14 + --> $DIR/lint-overflowing-ops.rs:232:14 | LL | let _n = 1u16 / 0; | ^^^^^^^^ attempt to divide `1_u16` by zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:234:15 + --> $DIR/lint-overflowing-ops.rs:233:15 | LL | let _n = &(1u16 / 0); | ^^^^^^^^^^ attempt to divide `1_u16` by zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:236:14 + --> $DIR/lint-overflowing-ops.rs:235:14 | LL | let _n = 1u32 / 0; | ^^^^^^^^ attempt to divide `1_u32` by zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:237:15 + --> $DIR/lint-overflowing-ops.rs:236:15 | LL | let _n = &(1u32 / 0); | ^^^^^^^^^^ attempt to divide `1_u32` by zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:239:14 + --> $DIR/lint-overflowing-ops.rs:238:14 | LL | let _n = 1u64 / 0; | ^^^^^^^^ attempt to divide `1_u64` by zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:240:15 + --> $DIR/lint-overflowing-ops.rs:239:15 | LL | let _n = &(1u64 / 0); | ^^^^^^^^^^ attempt to divide `1_u64` by zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:242:14 + --> $DIR/lint-overflowing-ops.rs:241:14 | LL | let _n = 1u128 / 0; | ^^^^^^^^^ attempt to divide `1_u128` by zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:243:15 + --> $DIR/lint-overflowing-ops.rs:242:15 | LL | let _n = &(1u128 / 0); | ^^^^^^^^^^^ attempt to divide `1_u128` by zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:245:14 + --> $DIR/lint-overflowing-ops.rs:244:14 | LL | let _n = 1usize / 0; | ^^^^^^^^^^ attempt to divide `1_usize` by zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:246:15 + --> $DIR/lint-overflowing-ops.rs:245:15 | LL | let _n = &(1usize / 0); | ^^^^^^^^^^^^ attempt to divide `1_usize` by zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:248:14 + --> $DIR/lint-overflowing-ops.rs:247:14 | LL | let _n = 1i8 / 0; | ^^^^^^^ attempt to divide `1_i8` by zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:249:15 + --> $DIR/lint-overflowing-ops.rs:248:15 | LL | let _n = &(1i8 / 0); | ^^^^^^^^^ attempt to divide `1_i8` by zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:250:14 + --> $DIR/lint-overflowing-ops.rs:249:14 | LL | let _n = i8::MIN / -1; | ^^^^^^^^^^^^ attempt to compute `i8::MIN / -1_i8`, which would overflow error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:251:15 + --> $DIR/lint-overflowing-ops.rs:250:15 | LL | let _n = &(i8::MIN / -1); | ^^^^^^^^^^^^^^ attempt to compute `i8::MIN / -1_i8`, which would overflow error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:253:14 + --> $DIR/lint-overflowing-ops.rs:252:14 | LL | let _n = 1i16 / 0; | ^^^^^^^^ attempt to divide `1_i16` by zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:254:15 + --> $DIR/lint-overflowing-ops.rs:253:15 | LL | let _n = &(1i16 / 0); | ^^^^^^^^^^ attempt to divide `1_i16` by zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:255:14 + --> $DIR/lint-overflowing-ops.rs:254:14 | LL | let _n = i16::MIN / -1; | ^^^^^^^^^^^^^ attempt to compute `i16::MIN / -1_i16`, which would overflow error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:256:15 + --> $DIR/lint-overflowing-ops.rs:255:15 | LL | let _n = &(i16::MIN / -1); | ^^^^^^^^^^^^^^^ attempt to compute `i16::MIN / -1_i16`, which would overflow error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:258:14 + --> $DIR/lint-overflowing-ops.rs:257:14 | LL | let _n = 1i32 / 0; | ^^^^^^^^ attempt to divide `1_i32` by zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:259:15 + --> $DIR/lint-overflowing-ops.rs:258:15 | LL | let _n = &(1i32 / 0); | ^^^^^^^^^^ attempt to divide `1_i32` by zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:260:14 + --> $DIR/lint-overflowing-ops.rs:259:14 | LL | let _n = i32::MIN / -1; | ^^^^^^^^^^^^^ attempt to compute `i32::MIN / -1_i32`, which would overflow error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:261:15 + --> $DIR/lint-overflowing-ops.rs:260:15 | LL | let _n = &(i32::MIN / -1); | ^^^^^^^^^^^^^^^ attempt to compute `i32::MIN / -1_i32`, which would overflow error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:263:14 + --> $DIR/lint-overflowing-ops.rs:262:14 | LL | let _n = 1i64 / 0; | ^^^^^^^^ attempt to divide `1_i64` by zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:264:15 + --> $DIR/lint-overflowing-ops.rs:263:15 | LL | let _n = &(1i64 / 0); | ^^^^^^^^^^ attempt to divide `1_i64` by zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:265:14 + --> $DIR/lint-overflowing-ops.rs:264:14 | LL | let _n = i64::MIN / -1; | ^^^^^^^^^^^^^ attempt to compute `i64::MIN / -1_i64`, which would overflow error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:266:15 + --> $DIR/lint-overflowing-ops.rs:265:15 | LL | let _n = &(i64::MIN / -1); | ^^^^^^^^^^^^^^^ attempt to compute `i64::MIN / -1_i64`, which would overflow error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:268:14 + --> $DIR/lint-overflowing-ops.rs:267:14 | LL | let _n = 1i128 / 0; | ^^^^^^^^^ attempt to divide `1_i128` by zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:269:15 + --> $DIR/lint-overflowing-ops.rs:268:15 | LL | let _n = &(1i128 / 0); | ^^^^^^^^^^^ attempt to divide `1_i128` by zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:270:14 + --> $DIR/lint-overflowing-ops.rs:269:14 | LL | let _n = i128::MIN / -1; | ^^^^^^^^^^^^^^ attempt to compute `i128::MIN / -1_i128`, which would overflow error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:271:15 + --> $DIR/lint-overflowing-ops.rs:270:15 | LL | let _n = &(i128::MIN / -1); | ^^^^^^^^^^^^^^^^ attempt to compute `i128::MIN / -1_i128`, which would overflow error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:273:14 + --> $DIR/lint-overflowing-ops.rs:272:14 | LL | let _n = 1isize / 0; | ^^^^^^^^^^ attempt to divide `1_isize` by zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:274:15 + --> $DIR/lint-overflowing-ops.rs:273:15 | LL | let _n = &(1isize / 0); | ^^^^^^^^^^^^ attempt to divide `1_isize` by zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:275:14 + --> $DIR/lint-overflowing-ops.rs:274:14 | LL | let _n = isize::MIN / -1; | ^^^^^^^^^^^^^^^ attempt to compute `isize::MIN / -1_isize`, which would overflow error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:276:15 + --> $DIR/lint-overflowing-ops.rs:275:15 | LL | let _n = &(isize::MIN / -1); | ^^^^^^^^^^^^^^^^^ attempt to compute `isize::MIN / -1_isize`, which would overflow error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:280:14 + --> $DIR/lint-overflowing-ops.rs:279:14 | LL | let _n = 1u8 % 0; | ^^^^^^^ attempt to calculate the remainder of `1_u8` with a divisor of zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:281:15 + --> $DIR/lint-overflowing-ops.rs:280:15 | LL | let _n = &(1u8 % 0); | ^^^^^^^^^ attempt to calculate the remainder of `1_u8` with a divisor of zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:283:14 + --> $DIR/lint-overflowing-ops.rs:282:14 | LL | let _n = 1u16 % 0; | ^^^^^^^^ attempt to calculate the remainder of `1_u16` with a divisor of zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:284:15 + --> $DIR/lint-overflowing-ops.rs:283:15 | LL | let _n = &(1u16 % 0); | ^^^^^^^^^^ attempt to calculate the remainder of `1_u16` with a divisor of zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:286:14 + --> $DIR/lint-overflowing-ops.rs:285:14 | LL | let _n = 1u32 % 0; | ^^^^^^^^ attempt to calculate the remainder of `1_u32` with a divisor of zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:287:15 + --> $DIR/lint-overflowing-ops.rs:286:15 | LL | let _n = &(1u32 % 0); | ^^^^^^^^^^ attempt to calculate the remainder of `1_u32` with a divisor of zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:289:14 + --> $DIR/lint-overflowing-ops.rs:288:14 | LL | let _n = 1u64 % 0; | ^^^^^^^^ attempt to calculate the remainder of `1_u64` with a divisor of zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:290:15 + --> $DIR/lint-overflowing-ops.rs:289:15 | LL | let _n = &(1u64 % 0); | ^^^^^^^^^^ attempt to calculate the remainder of `1_u64` with a divisor of zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:292:14 + --> $DIR/lint-overflowing-ops.rs:291:14 | LL | let _n = 1u128 % 0; | ^^^^^^^^^ attempt to calculate the remainder of `1_u128` with a divisor of zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:293:15 + --> $DIR/lint-overflowing-ops.rs:292:15 | LL | let _n = &(1u128 % 0); | ^^^^^^^^^^^ attempt to calculate the remainder of `1_u128` with a divisor of zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:295:14 + --> $DIR/lint-overflowing-ops.rs:294:14 | LL | let _n = 1usize % 0; | ^^^^^^^^^^ attempt to calculate the remainder of `1_usize` with a divisor of zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:296:15 + --> $DIR/lint-overflowing-ops.rs:295:15 | LL | let _n = &(1usize % 0); | ^^^^^^^^^^^^ attempt to calculate the remainder of `1_usize` with a divisor of zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:298:14 + --> $DIR/lint-overflowing-ops.rs:297:14 | LL | let _n = 1i8 % 0; | ^^^^^^^ attempt to calculate the remainder of `1_i8` with a divisor of zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:299:15 + --> $DIR/lint-overflowing-ops.rs:298:15 | LL | let _n = &(1i8 % 0); | ^^^^^^^^^ attempt to calculate the remainder of `1_i8` with a divisor of zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:300:14 + --> $DIR/lint-overflowing-ops.rs:299:14 | LL | let _n = i8::MIN % -1; | ^^^^^^^^^^^^ attempt to compute `i8::MIN % -1_i8`, which would overflow error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:301:15 + --> $DIR/lint-overflowing-ops.rs:300:15 | LL | let _n = &(i8::MIN % -1); | ^^^^^^^^^^^^^^ attempt to compute `i8::MIN % -1_i8`, which would overflow error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:303:14 + --> $DIR/lint-overflowing-ops.rs:302:14 | LL | let _n = 1i16 % 0; | ^^^^^^^^ attempt to calculate the remainder of `1_i16` with a divisor of zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:304:15 + --> $DIR/lint-overflowing-ops.rs:303:15 | LL | let _n = &(1i16 % 0); | ^^^^^^^^^^ attempt to calculate the remainder of `1_i16` with a divisor of zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:305:14 + --> $DIR/lint-overflowing-ops.rs:304:14 | LL | let _n = i16::MIN % -1; | ^^^^^^^^^^^^^ attempt to compute `i16::MIN % -1_i16`, which would overflow error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:306:15 + --> $DIR/lint-overflowing-ops.rs:305:15 | LL | let _n = &(i16::MIN % -1); | ^^^^^^^^^^^^^^^ attempt to compute `i16::MIN % -1_i16`, which would overflow error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:308:14 + --> $DIR/lint-overflowing-ops.rs:307:14 | LL | let _n = 1i32 % 0; | ^^^^^^^^ attempt to calculate the remainder of `1_i32` with a divisor of zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:309:15 + --> $DIR/lint-overflowing-ops.rs:308:15 | LL | let _n = &(1i32 % 0); | ^^^^^^^^^^ attempt to calculate the remainder of `1_i32` with a divisor of zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:310:14 + --> $DIR/lint-overflowing-ops.rs:309:14 | LL | let _n = i32::MIN % -1; | ^^^^^^^^^^^^^ attempt to compute `i32::MIN % -1_i32`, which would overflow error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:311:15 + --> $DIR/lint-overflowing-ops.rs:310:15 | LL | let _n = &(i32::MIN % -1); | ^^^^^^^^^^^^^^^ attempt to compute `i32::MIN % -1_i32`, which would overflow error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:313:14 + --> $DIR/lint-overflowing-ops.rs:312:14 | LL | let _n = 1i64 % 0; | ^^^^^^^^ attempt to calculate the remainder of `1_i64` with a divisor of zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:314:15 + --> $DIR/lint-overflowing-ops.rs:313:15 | LL | let _n = &(1i64 % 0); | ^^^^^^^^^^ attempt to calculate the remainder of `1_i64` with a divisor of zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:315:14 + --> $DIR/lint-overflowing-ops.rs:314:14 | LL | let _n = i64::MIN % -1; | ^^^^^^^^^^^^^ attempt to compute `i64::MIN % -1_i64`, which would overflow error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:316:15 + --> $DIR/lint-overflowing-ops.rs:315:15 | LL | let _n = &(i64::MIN % -1); | ^^^^^^^^^^^^^^^ attempt to compute `i64::MIN % -1_i64`, which would overflow error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:318:14 + --> $DIR/lint-overflowing-ops.rs:317:14 | LL | let _n = 1i128 % 0; | ^^^^^^^^^ attempt to calculate the remainder of `1_i128` with a divisor of zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:319:15 + --> $DIR/lint-overflowing-ops.rs:318:15 | LL | let _n = &(1i128 % 0); | ^^^^^^^^^^^ attempt to calculate the remainder of `1_i128` with a divisor of zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:320:14 + --> $DIR/lint-overflowing-ops.rs:319:14 | LL | let _n = i128::MIN % -1; | ^^^^^^^^^^^^^^ attempt to compute `i128::MIN % -1_i128`, which would overflow error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:321:15 + --> $DIR/lint-overflowing-ops.rs:320:15 | LL | let _n = &(i128::MIN % -1); | ^^^^^^^^^^^^^^^^ attempt to compute `i128::MIN % -1_i128`, which would overflow error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:323:14 + --> $DIR/lint-overflowing-ops.rs:322:14 | LL | let _n = 1isize % 0; | ^^^^^^^^^^ attempt to calculate the remainder of `1_isize` with a divisor of zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:324:15 + --> $DIR/lint-overflowing-ops.rs:323:15 | LL | let _n = &(1isize % 0); | ^^^^^^^^^^^^ attempt to calculate the remainder of `1_isize` with a divisor of zero error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:325:14 + --> $DIR/lint-overflowing-ops.rs:324:14 | LL | let _n = isize::MIN % -1; | ^^^^^^^^^^^^^^^ attempt to compute `isize::MIN % -1_isize`, which would overflow error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:326:15 + --> $DIR/lint-overflowing-ops.rs:325:15 | LL | let _n = &(isize::MIN % -1); | ^^^^^^^^^^^^^^^^^ attempt to compute `isize::MIN % -1_isize`, which would overflow error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:329:14 + --> $DIR/lint-overflowing-ops.rs:328:14 | LL | let _n = [1, 2, 3][4]; | ^^^^^^^^^^^^ index out of bounds: the length is 3 but the index is 4 error: this operation will panic at runtime - --> $DIR/lint-overflowing-ops.rs:330:15 + --> $DIR/lint-overflowing-ops.rs:329:15 | LL | let _n = &([1, 2, 3][4]); | ^^^^^^^^^^^^^^ index out of bounds: the length is 3 but the index is 4 diff --git a/tests/ui/lint/lint-overflowing-ops.rs b/tests/ui/lint/lint-overflowing-ops.rs index 116460f11cc01..d6f4fcc02d7f8 100644 --- a/tests/ui/lint/lint-overflowing-ops.rs +++ b/tests/ui/lint/lint-overflowing-ops.rs @@ -10,7 +10,6 @@ //@ [opt]compile-flags: -O //@ [opt_with_overflow_checks]compile-flags: -C overflow-checks=on -O -Z deduplicate-diagnostics=yes //@ build-fail -//@ ignore-pass (test tests codegen-time behaviour) //@ normalize-stderr: "shift left by `(64|32)_usize`, which" -> "shift left by `%BITS%`, which" //@ normalize-stderr: "shift right by `(64|32)_usize`, which" -> "shift right by `%BITS%`, which" diff --git a/tests/ui/print_type_sizes/async.rs b/tests/ui/print_type_sizes/async.rs index b6ec88426345b..70da909ee6d02 100644 --- a/tests/ui/print_type_sizes/async.rs +++ b/tests/ui/print_type_sizes/async.rs @@ -4,7 +4,7 @@ //@ needs-deterministic-layouts //@ edition:2021 //@ build-pass -//@ ignore-pass +//@ no-pass-override (codegen affects -Zprint-type-sizes) //@ only-x86_64 #![allow(dropping_copy_types)] diff --git a/tests/ui/print_type_sizes/coroutine.rs b/tests/ui/print_type_sizes/coroutine.rs index a255ce226ee6f..0e0199feab8b1 100644 --- a/tests/ui/print_type_sizes/coroutine.rs +++ b/tests/ui/print_type_sizes/coroutine.rs @@ -1,7 +1,7 @@ //@ edition:2015..2021 //@ compile-flags: -Z print-type-sizes --crate-type=lib //@ build-pass -//@ ignore-pass +//@ no-pass-override (codegen affects -Zprint-type-sizes) #![feature(coroutines, coroutine_trait)] diff --git a/tests/ui/print_type_sizes/coroutine_discr_placement.rs b/tests/ui/print_type_sizes/coroutine_discr_placement.rs index d97b0b28ed0fe..3651b165bedff 100644 --- a/tests/ui/print_type_sizes/coroutine_discr_placement.rs +++ b/tests/ui/print_type_sizes/coroutine_discr_placement.rs @@ -1,6 +1,6 @@ //@ compile-flags: -Z print-type-sizes --crate-type lib //@ build-pass -//@ ignore-pass +//@ no-pass-override (codegen affects -Zprint-type-sizes) // Tests a coroutine that has its discriminant as the *final* field. diff --git a/tests/ui/print_type_sizes/generics.rs b/tests/ui/print_type_sizes/generics.rs index af26dc690d27b..e7baeae3ae85a 100644 --- a/tests/ui/print_type_sizes/generics.rs +++ b/tests/ui/print_type_sizes/generics.rs @@ -1,6 +1,6 @@ //@ compile-flags: -Z print-type-sizes --crate-type=lib //@ build-pass -//@ ignore-pass +//@ no-pass-override (codegen affects -Zprint-type-sizes) // ^-- needed because `--pass check` does not emit the output needed. // FIXME: consider using an attribute instead of side-effects. diff --git a/tests/ui/print_type_sizes/niche-filling.rs b/tests/ui/print_type_sizes/niche-filling.rs index 4a8d3b81b9d37..1bcbdf2a999c1 100644 --- a/tests/ui/print_type_sizes/niche-filling.rs +++ b/tests/ui/print_type_sizes/niche-filling.rs @@ -11,7 +11,7 @@ //@ compile-flags: -Z print-type-sizes --crate-type lib //@ ignore-std-debug-assertions (debug assertions will print more types) //@ build-pass -//@ ignore-pass +//@ no-pass-override (codegen affects -Zprint-type-sizes) // ^-- needed because `--pass check` does not emit the output needed. // FIXME: consider using an attribute instead of side-effects. #![allow(dead_code)] diff --git a/tests/ui/print_type_sizes/no_duplicates.rs b/tests/ui/print_type_sizes/no_duplicates.rs index 0903fd6fa9a47..908701e509edf 100644 --- a/tests/ui/print_type_sizes/no_duplicates.rs +++ b/tests/ui/print_type_sizes/no_duplicates.rs @@ -1,6 +1,6 @@ //@ compile-flags: -Z print-type-sizes --crate-type=lib //@ build-pass -//@ ignore-pass +//@ no-pass-override (codegen affects -Zprint-type-sizes) // ^-- needed because `--pass check` does not emit the output needed. // FIXME: consider using an attribute instead of side-effects. diff --git a/tests/ui/print_type_sizes/packed.rs b/tests/ui/print_type_sizes/packed.rs index 888fa41a7597e..a86b7f2f32362 100644 --- a/tests/ui/print_type_sizes/packed.rs +++ b/tests/ui/print_type_sizes/packed.rs @@ -1,6 +1,6 @@ //@ compile-flags: -Z print-type-sizes --crate-type=lib //@ build-pass -//@ ignore-pass +//@ no-pass-override (codegen affects -Zprint-type-sizes) // ^-- needed because `--pass check` does not emit the output needed. // FIXME: consider using an attribute instead of side-effects. diff --git a/tests/ui/print_type_sizes/repr-align.rs b/tests/ui/print_type_sizes/repr-align.rs index 1b9a22dcef7af..a7ba4d82d55ec 100644 --- a/tests/ui/print_type_sizes/repr-align.rs +++ b/tests/ui/print_type_sizes/repr-align.rs @@ -1,6 +1,6 @@ //@ compile-flags: -Z print-type-sizes --crate-type=lib //@ build-pass -//@ ignore-pass +//@ no-pass-override (codegen affects -Zprint-type-sizes) // ^-- needed because `--pass check` does not emit the output needed. // FIXME: consider using an attribute instead of side-effects. diff --git a/tests/ui/print_type_sizes/uninhabited.rs b/tests/ui/print_type_sizes/uninhabited.rs index 7cb3e5b33fa56..a062a342dbd83 100644 --- a/tests/ui/print_type_sizes/uninhabited.rs +++ b/tests/ui/print_type_sizes/uninhabited.rs @@ -1,6 +1,6 @@ //@ compile-flags: -Z print-type-sizes --crate-type=lib //@ build-pass -//@ ignore-pass +//@ no-pass-override (codegen affects -Zprint-type-sizes) // ^-- needed because `--pass check` does not emit the output needed. // FIXME: consider using an attribute instead of side-effects. diff --git a/tests/ui/print_type_sizes/zero-sized-fields.rs b/tests/ui/print_type_sizes/zero-sized-fields.rs index b3c4b684c6e80..6fcc51df47b31 100644 --- a/tests/ui/print_type_sizes/zero-sized-fields.rs +++ b/tests/ui/print_type_sizes/zero-sized-fields.rs @@ -1,6 +1,6 @@ //@ compile-flags: -Z print-type-sizes --crate-type=lib //@ build-pass -//@ ignore-pass +//@ no-pass-override (codegen affects -Zprint-type-sizes) // At one point, zero-sized fields such as those in this file were causing // incorrect output from `-Z print-type-sizes`. diff --git a/tests/ui/proc-macro/auxiliary/generate-mod.rs b/tests/ui/proc-macro/auxiliary/generate-mod.rs index 81ea2945818cc..1d9176def9c68 100644 --- a/tests/ui/proc-macro/auxiliary/generate-mod.rs +++ b/tests/ui/proc-macro/auxiliary/generate-mod.rs @@ -1,6 +1,4 @@ //@ edition:2015 -//@ run-pass -//@ ignore-pass extern crate proc_macro; use proc_macro::*; diff --git a/tests/ui/rmeta/emit-artifact-notifications.rs b/tests/ui/rmeta/emit-artifact-notifications.rs index 693f406683dbb..200dbaef156a1 100644 --- a/tests/ui/rmeta/emit-artifact-notifications.rs +++ b/tests/ui/rmeta/emit-artifact-notifications.rs @@ -1,6 +1,6 @@ //@ compile-flags:--emit=metadata --error-format=json --json artifacts //@ build-pass -//@ ignore-pass +//@ no-pass-override // ^-- needed because `--pass check` does not emit the output needed. // A very basic test for the emission of artifact notifications in JSON output.