Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make the const_err lint deny-by-default #50653

Merged
merged 1 commit into from
May 18, 2018
Merged

Conversation

oli-obk
Copy link
Contributor

@oli-obk oli-obk commented May 11, 2018

At best these things are runtime panics (debug mode) or overflows (release mode). More likely they are public constants that are unused in the crate declaring them.

This is not a breaking change, as dependencies won't break and root crates can #![warn(const_err)], though I don't know why anyone would do that.

@rust-highfive
Copy link
Collaborator

r? @cramertj

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 11, 2018
@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-3.9 of your PR failed on Travis (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
travis_time:start:test_compile-fail
Check compiletest suite=compile-fail mode=compile-fail (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
[01:03:12] 
[01:03:12] running 2311 tests
[01:03:17] ..............F.F...................................................................................
[01:03:30] ....................................................................................................
[01:03:37] ....................................................................................................
[01:03:37] ....................................................................................................
[01:03:44] ........F...........i............................................................ii.iii.............
[01:03:50] .........................................................F..........................................
[01:04:04] ....................................................................................................
[01:04:10] ............i.......................................................................................
[01:04:17] ....................................................................................................
[01:04:25] ....................................................................................................
---
[01:06:17] failures:
[01:06:17] 
[01:06:17] ---- [compile-fail] compile-fail/array_const_index-0.rs stdout ----
[01:06:17]  
[01:06:17] error: /checkout/src/test/compile-fail/array_const_index-0.rs:12: unexpected error: '12:1: 12:24: this constant cannot be used [const_err]'
[01:06:17] 
[01:06:17] error: /checkout/src/test/compile-fail/array_const_index-0.rs:12: expected error not found: constant evaluation error
[01:06:17] 
[01:06:17] error: /checkout/src/test/compile-fail/array_const_index-0.rs:12: expected warning not found: this constant cannot be used
[01:06:17] 
[01:06:17] error: 1 unexpected errors found, 2 expected errors not found
[01:06:17] status: exit code: 101
[01:06:17] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/compile-fail/array_const_index-0.rs" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/compile-fail" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/compile-fail/array_const_index-0.stage2-x86_64-unknown-linux-gnu" "-Crpath" "-O" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/compile-fail/array_const_index-0.stage2-x86_64-unknown-linux-gnu.aux" "-A" "unused"
[01:06:17] unexpected errors (from JSON output): [
[01:06:17]     Error {
[01:06:17]         line_num: 12,
[01:06:17]         kind: Some(
[01:06:17]         ),
[01:06:17]         ),
[01:06:17]         msg: "12:1: 12:24: this constant cannot be used [const_err]"
[01:06:17] ]
[01:06:17] 
[01:06:17] not found errors (from test file): [
[01:06:17]     Error {
[01:06:17]     Error {
[01:06:17]         line_num: 12,
[01:06:17]         kind: Some(
[01:06:17]             Error
[01:06:17]         ),
[01:06:17]         msg: "constant evaluation error"
[01:06:17]     Error {
[01:06:17]         line_num: 12,
[01:06:17]         kind: Some(
[01:06:17]             Warning
[01:06:17]             Warning
[01:06:17]         ),
[01:06:17]         msg: "this constant cannot be used"
[01:06:17] ]
[01:06:17] 
[01:06:17] thread '[compile-fail] compile-fail/array_const_index-0.rs' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:1312:13
[01:06:17] note: Run with `RUST_BACKTRACE=1` for a backtrace.
[01:06:17] note: Run with `RUST_BACKTRACE=1` for a backtrace.
[01:06:17] 
[01:06:17] ---- [compile-fail] compile-fail/array_const_index-1.rs stdout ----
[01:06:17]  
[01:06:17] error: /checkout/src/test/compile-fail/array_const_index-1.rs:12: unexpected error: '12:1: 12:21: this constant cannot be used [const_err]'
[01:06:17] 
[01:06:17] error: /checkout/src/test/compile-fail/array_const_index-1.rs:12: expected error not found: constant evaluation error
[01:06:17] 
[01:06:17] error: /checkout/src/test/compile-fail/array_const_index-1.rs:12: expected warning not found: this constant cannot be used
[01:06:17] 
[01:06:17] error: 1 unexpected errors found, 2 expected errors not found
[01:06:17] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stagt-slice-oob.rs stdout ----
[01:06:17]  
[01:06:17]  
[01:06:17] error: /checkout/src/test/compile-fail/const-slice-oob.rs:14: unexpected error: '14:1: 14:25: this constant cannot be used [const_err]'
[01:06:17] 
[01:06:17] error: /checkout/src/test/compile-fail/const-slice-oob.rs:14: expected error not found: constant evaluation error [E0080]
[01:06:17] 
[01:06:17] error: /checkout/src/test/compile-fail/const-slice-oob.rs:14: expected warning not found: this constant cannot be used
[01:06:17] 
[01:06:17] error: 1 unexpected errors found, 2 expected errors not found
[01:06:17] status: exit code: 101
[01:06:17] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/compile-fail/const-slice-oob.rs" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/compile-fail" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/compile-fail/const-slice-oob.stage2-x86_64-unknown-linux-gnu" "-Crpath" "-O" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/compile-fail/const-slice-oob.stage2-x86_64-unknown-linux-gnu.aux" "-A" "unused"
[01:06:17] unexpected errors (from JSON output): [
[01:06:17]     Error {
[01:06:17]         line_num: 14,
[01:06:17]         kind: Some(
[01:06:17]         ),
[01:06:17]         ),
[01:06:17]         msg: "14:1: 14:25: this constant cannot be used [const_err]"
[01:06:17] ]
[01:06:17] 
[01:06:17] not found errors (from test file): [
[01:06:17] not found errors (from test file): [
[01: "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/compile-fail/eval-enum.stage2-x86_64-unknown-linux-gnu" "-Crpath" "-O" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/compile-fail/eval-enum.stage2-x86_64-unknown-linux-gnu.aux" "-A" "unused"
[01:06:17] unexpected errors (from JSON output): [
[01:06:17]     Error {
[01:06:17]         line_num: 12,
[01:06:17]         kind: Some(
[01:06:17]         ),
[01:06:17]         ),
[01:06:17]         msg: "12:15: 12:18: constant evaluation error [E0080]"
[01:06:17]     Error {
[01:06:17]         line_num: 16,
[01:06:17]         kind: Some(
[01:06:17]             Error
[01:06:17]             Error
[01:06:17]         ),
[01:06:17]         msg: "16:15: 16:18: constant evaluation error [E0080]"
[01:06:17] ]
[01:06:17] 
[01:06:17] not found errors (from test file): [
[01:06:17]     Error {
[01:06:17]     Error {
[01:06:17]         line_num: 12,
[01:06:17]         kind: Some(
[01:06:17]             Warning
[01:06:17]         ),
[01:06:17]         msg: "constant evaluation error"
[01:06:17]     Error {
[01:06:17]         line_num: 16,
[01:06:17]         kind: Some(
[01:06:17]             Warning
[01:06:17]             Warning
[01:06:17]         ),
[01:06:17]         msg: "constant evaluation error"
[01:06:17] ]
[01:06:17] 
[01:06:17] thread '[compile-fail] compile-fail/eval-enum.rs' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:1312:13
[01:06:17] 
---
[01:06:17] 
[01:06:17] thread 'main' panicked at 'Some tests failed', tools/compiletest/src/main.rs:492:22
[01:06:17] 
[01:06:17] 
[01:06:17] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/compiletest" "--compile-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib" "--run-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" "--rustc-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "--src-base" "/checkout/src/test/compile-fail" "--build-base" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/compile-fail" "--stage-id" "stage2-x86_64-unknown-linux-gnu" "--mode" "compile-fail" "--target" "x86_64-unknown-linux-gnu" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/usr/lib/llvm-3.9/bin/FileCheck" "--host-rustcflags" "-Crpath -O -Zunstable-options " "--target-rustcflags" "-Crpath -O -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--docck-python" "/usr/bin/python2.7" "--lldb-python" "/usr/bin/python2.7" "--gdb" "/usr/bin/gdb" "--quiet" "--llvm-version" "3.9.1\n" "--system-llvm" "--cc" "" "--cxx" "" "--cflags" "" "--llvm-components" "" "--llvm-cxxflags" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--color" "always"
[01:06:17] 
[01:06:17] 
[01:06:17] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
[01:06:17] Build completed unsuccessfully in 0:17:27
[01:06:17] Build completed unsuccessfully in 0:17:27
[01:06:17] Makefile:58: recipe for target 'check' failed
[01:06:17] make: *** [check] Error 1

The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:11a152f7
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
---
149800 ./.git/modules
149796 ./.git/modules/src
149116 ./src/llvm-emscripten/test
124332 ./obj/build/bootstrap/debug/incremental/bootstrap-182x3aewwy26b
124328 ./obj/build/bootstrap/debug/incremental/bootstrap-182x3aewwy26b/s-f0xq7o24gx-1vn2dho-22v3gsapbxtg7
116624 ./obj/build/x86_64-unknown-linux-gnu/stage1-std/x8./src/libcompiler_builtins
39456 ./obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/deps
39368 ./src/llvm/lib/Target
38828 ./obj/build/x86_64-unknown-linux-gnu/stage0-tools/release/build
35996 ./obj/build/x86_64-unknown-linux-gnu/stage0-tools/release/deps

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-3.9 of your PR failed on Travis (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
travis_time:start:test_run-fail
Check compiletest suite=run-fail mode=run-fail (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
[01:17:37] 
[01:17:37] running 138 tests
[01:17:50] ............................................................................F....FF........F........
[01:17:55] failures:
[01:17:55] 
[01:17:55] ---- [run-fail] run-fail/overflowing-add.rs stdout ----
[01:17:55]  
[01:17:55]  
[01:17:55] error: compilation failed!
[01:17:55] status: exit code: 101
[01:17:55] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/run-fail/overflowing-add.rs" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-fail" "--target=x86_64-unknown-linux-gnu" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-fail/overflowing-add.stage2-x86_64-unknown-linux-gnu" "-Crpath" "-O" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-C" "debug-assertions" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-fail/overflowing-add.stage2-x86_64-unknown-linux-gnu.aux"
[01:17:55] ------------------------------------------
[01:17:55] 
[01:17:55] ------------------------------------------
[01:17:55] stderr:
[01:17:55] stderr:
[01:17:55] ------------------------------------------
[01:17:55] error: attempt to add with overflow
[01:17:55]    |
[01:17:55]    |
[01:17:55] 15 |     let _x = 200u8 + 200u8 + 200u8;
[01:17:55]    |
[01:17:55]    |
[01:17:55]    = note: #[deny(const_err)] on by default
[01:17:55] error: aborting due to previous error
[01:17:55] 
[01:17:55] 
[01:17:55] ------------------------------------------
[01:17:55] ------------------------------------------
[01:17:55] 
[01:17:55] thread '[run-fail] run-fail/overflowing-add.rs' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:3033:9
[01:17:55] 
[01:17:55] ---- [run-fail] run-fail/overflowing-mul.rs stdout ----
[01:17:55]  
[01:17:55] error: compilation failed!
[01:17:55] status: exit code: 101
[01:17:55] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/run-fail/overflowing-mul.rs" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-fail" "--target=x86_64-unknown-linux-gnu" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-fail/overflowing-mul.stage2-x86_64-unknown-linux-gnu" "-Crpath" "-O" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-C" "debug-assertions" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-fail/overflowing-mul.stage2-x86_64-unknown-linux-gnu.aux"
[01:17:55] ------------------------------------------
[01:17:55] 
[01:17:55] ------------------------------------------
[01:17:55] stderr:
[01:17:55] stderr:
[01:17:55] ------------------------------------------
[01:17:55] warning: unused variable: `x`
[01:17:55]   --> /checkout/src/test/run-fail/overflowing-mul.rs:15:9
[01:17:55]    |
[01:17:55] 15 |     let x = 200u8 * 4;
[01:17:55]    |         ^ help: consider using `_x` instead
[01:17:55]    = note: #[warn(unused_variables)] on by default
[01:17:55] 
[01:17:55] 
[01:17:55] error: attempt to multiply with overflow
[01:17:55]    |
[01:17:55]    |
[01:17:55] 15 |     let x = 200u8 * 4;
[01:17:55]    |
[01:17:55]    |
[01:17:55]    = note: #[deny(const_err)] on by default
[01:17:55] error: aborting due to previous error
[01:17:55] 
[01:17:55] 
[01:17:55] ------------------------------------------
[01:17:55] ------------------------------------------
[01:17:55] 
[01:17:55] thread '[run-fail] run-fail/overflowing-mul.rs' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:3033:9
[01:17:55] 
[01:17:55] ---- [run-fail] run-fail/overflowing-neg.rs stdout ----
[01:17:55]  
[01:17:55] error: compilation failed!
[01:17:55] status: exit code: 101
[01:17:55] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/run-fail/overflowing-neg.rs" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-fail" "--target=x86_64-unknown-linux-gnu" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-fail/overflowing-neg.stage2-x86_64-unknown-linux-gnu" "-Crpath" "-O" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-C" "debug-assertions" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-fail/overflowing-neg.stage2-x86_64-unknown-linux-gnu.aux"
[01:17:55] ------------------------------------------
[01:17:55] 
[01:17:55] ------------------------------------------
[01:17:55] stderr:
[01:17:55] stderr:
[01:17:55] ------------------------------------------
[01:17:55] error: attempt to negate with overflow
[01:17:55]    |
[01:17:55]    |
[01:17:55] 15 |     let _x = -std::i8::MIN;
[01:17:55]    |
[01:17:55]    |
[01:17:55]    = note: #[deny(const_err)] on by default
[01:17:55] error: constant evaluation error
[01:17:55]   --> /checkout/src/test/run-fail/overflowing-neg.rs:15:14
[01:17:55]    |
[01:17:55]    |
[01:17:55] 15 |     let _x = -std::i8::MIN;
[01:17:55]    |              ^^^^^^^^^^^^^ attempt to negate with overflow
[01:17:55] error: aborting due to 2 previous errors
[01:17:55] 
[01:17:55] 
[01:17:55] ------------------------------------------
[01:17:55] ------------------------------------------
[01:17:55] 
[01:17:55] thread '[run-fail] run-fail/overflowing-neg.rs' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:3033:9
[01:17:55] 
[01:17:55] ---- [run-fail] run-fail/overflowing-sub.rs stdout ----
[01:17:55]  
[01:17:55] error: compilation failed!
[01:17:55] status: exit code: 101
[01:17:55] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/run-fail/overflowing-sub.rs" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-fail" "--target=x86_64-unknown-linux-gnu" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-fail/overflowing-sub.stage2-x86_64-unknown-linux-gnu" "-Crpath" "-O" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-C" "debug-assertions" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-fail/overflowing-sub.stage2-x86_64-unknown-linux-gnu.aux"
[01:17:55] ------------------------------------------
[01:17:55] 
[01:17:55] ------------------------------------------
[01:17:55] stderr:
[01:17:55] stderr:
[01:17:55] ------------------------------------------
[01:17:55] error: attempt to subtract with overflow
[01:17:55]    |
[01:17:55]    |
[01:17:55] 15 |     let _x = 42u8 - (42u8 + 1);
[01:17:55]    |
[01:17:55]    |
[01:17:55]    = note: #[deny(const_err)] on by default
[01:17:55] error: aborting due to previous error
[01:17:55] 
[01:17:55] 
[01:17:55] ------------------------------------------
---
[01:17:55] test result: FAILED. 133 passed; 4 failed; 1 ignored; 0 measured; 0 filtered out
[01:17:55] 
[01:17:55] 
[01:17:55] 
[01:17:55] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/compiletest" "--compile-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib" "--run-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" "--rustc-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "--src-base" "/checkout/src/test/run-fail" "--build-base" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-fail" "--stage-id" "stage2-x86_64-unknown-linux-gnu" "--mode" "run-fail" "--target" "x86_64-unknown-linux-gnu" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/usr/lib/llvm-3.9/bin/FileCheck" "--host-rustcflags" "-Crpath -O -Zunstable-options " "--target-rustcflags" "-Crpath -O -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--docck-python" "/usr/bin/python2.7" "--lldb-python" "/usr/bin/python2.7" "--gdb" "/usr/bin/gdb" "--quiet" "--llvm-version" "3.9.1\n" "--system-llvm" "--cc" "" "--cxx" "" "--cflags" "" "--llvm-components" "" "--llvm-cxxflags" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--color" "always"
[01:17:55] 
[01:17:55] 
[01:17:55] thread 'main' panicked at 'Some tests failed', tools/compiletest/src/main.rs:492:22
[01:17:55] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
[01:17:55] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
[01:17:55] Build completed unsuccessfully in 0:21:47
[01:17:55] Makefile:58: recipe for target 'check' failed
[01:17:55] make: *** [check] Error 1

The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:04f73ab4
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-3.9 of your PR failed on Travis (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
[01:27:55] failures:
[01:27:55] 
[01:27:55] ---- [incremental] incremental/warnings-reemitted.rs stdout ----
[01:27:55]  
[01:27:55] error in revision `cfail1`: test compilation failed although it shouldn't!
[01:27:55] status: exit code: 101
[01:27:55] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/incremental/warnings-reemitted.rs" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/incremental" "--target=x86_64-unknown-linux-gnu" "--cfg" "cfail1" "-C" "incremental=/checkout/obj/build/x86_64-unknown-linux-gnu/test/incremental/warnings-reemitted.inc" "-Z" "incremental-verify-ich" "-Z" "incremental-queries" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/incremental/warnings-reemitted.stage2-x86_64-unknown-linux-gnu" "-Crpath" "-O" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-Coverflow-checks=on" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/incremental/warnings-reemitted.stage2-x86_64-unknown-linux-gnu.aux"
[01:27:55] ------------------------------------------
[01:27:55] 
[01:27:55] ------------------------------------------
[01:27:55] stderr:
[01:27:55] stderr:
[01:27:55] ------------------------------------------
[01:27:55] {"message":"attempt to add with overflow","code":{"code":"const_err","explanation":null},"level":"error","spans":[{"file_name":"/checkout/src/test/incremental/warnings-reemitted.rs","byte_start":595,"byte_end":604,"line_start":18,"line_end":18,"column_start":5,"column_end":14,"is_primary":true,"text":[{"text":"    255u8 + 1; //~ WARNING this expression will panic at run-time","highlight_start":5,"highlight_end":14}],"label":null,"suggested_replacement":null,"expansion":null}],"children":[{"message":"#[deny(const_err)] on by default","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"error: attempt to add with overflow\n  --> /checkout/src/test/incremental/warnings-reemitted.rs:18:5\n   |\nLL |     255u8 + 1; //~ WARNING this expression will panic at run-time\n   |     ^^^^^^^^^\n   |\n   = note: #[deny(const_err)] on by default\n\n"}
[01:27:55] {"message":"aborting due to previous error","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to previous error\n\n"}
[01:27:55] ------------------------------------------
[01:27:55] 
[01:27:55] thread '[incremental] incremental/warnings-reemitted.rs' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:3033:9
[01:27:55] 
---
[01:27:55] test result: FAILED. 87 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out
[01:27:55] 
[01:27:55] 
[01:27:55] 
[01:27:55] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/compiletest" "--compile-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib" "--run-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" "--rustc-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "--src-base" "/checkout/src/test/incremental" "--build-base" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/incremental" "--stage-id" "stage2-x86_64-unknown-linux-gnu" "--mode" "incremental" "--target" "x86_64-unknown-linux-gnu" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/usr/lib/llvm-3.9/bin/FileCheck" "--host-rustcflags" "-Crpath -O -Zunstable-options " "--target-rustcflags" "-Crpath -O -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--docck-python" "/usr/bin/python2.7" "--lldb-python" "/usr/bin/python2.7" "--gdb" "/usr/bin/gdb" "--quiet" "--llvm-version" "3.9.1\n" "--system-llvm" "--cc" "" "--cxx" "" "--cflags" "" "--llvm-components" "" "--llvm-cxxflags" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--color" "always"
[01:27:55] 
[01:27:55] 
[01:27:55] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
[01:27:55] Build completed unsuccessfully in 0:24:30
[01:27:55] Build completed unsuccessfully in 0:24:30
[01:27:55] Makefile:58: recipe for target 'check' failed
[01:27:55] make: *** [check] Error 1

The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:023c0fa8
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@cramertj
Copy link
Member

r=me with travis passing

@kennytm kennytm added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 11, 2018
@oli-obk
Copy link
Contributor Author

oli-obk commented May 15, 2018

@bors r=cramertj

@bors
Copy link
Contributor

bors commented May 15, 2018

📌 Commit 1788af3 has been approved by cramertj

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels May 15, 2018
@bors
Copy link
Contributor

bors commented May 18, 2018

⌛ Testing commit 1788af3 with merge a722296...

bors added a commit that referenced this pull request May 18, 2018
Make the `const_err` lint `deny`-by-default

At best these things are runtime panics (debug mode) or overflows (release mode). More likely they are public constants that are unused in the crate declaring them.

This is not a breaking change, as dependencies won't break and root crates can `#![warn(const_err)]`, though I don't know why anyone would do that.
@bors
Copy link
Contributor

bors commented May 18, 2018

☀️ Test successful - status-appveyor, status-travis
Approved by: cramertj
Pushing a722296 to master...

@bors bors merged commit 1788af3 into rust-lang:master May 18, 2018
stlankes added a commit to RWTH-OS/libwhp that referenced this pull request Dec 31, 2019
stlankes added a commit to RWTH-OS/ehyve that referenced this pull request Dec 31, 2019
stlankes added a commit to RWTH-OS/libwhp that referenced this pull request Dec 31, 2019
@oli-obk oli-obk deleted the bad_const branch June 15, 2020 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants