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

Confusing errors in Rust 1.78 #219

Closed
ehuss opened this issue Apr 15, 2024 · 1 comment · Fixed by #221
Closed

Confusing errors in Rust 1.78 #219

ehuss opened this issue Apr 15, 2024 · 1 comment · Fixed by #221

Comments

@ehuss
Copy link
Contributor

ehuss commented Apr 15, 2024

Running cargo test in this repo is producing errors in beta and nightly:

     Running tests/integration.rs (target/debug/deps/integration-2e04e0a1a5df77ee)
tests/integrations/basic-bin/Cargo.toml ... ok
tests/integrations/cargo-run/Cargo.toml ... ok
tests/integrations/basic-fail-mode/Cargo.toml ... ok
tests/integrations/basic-fail/Cargo.toml ... ok
tests/integrations/basic/Cargo.toml ... FAILED

FAILED TEST: tests/integrations/basic/Cargo.toml
command: BLESS="" RUST_BACKTRACE="0" RUST_TEST_THREADS="1" "/Users/eric/.rustup/toolchains/nightly-aarch64-apple-darwin/bin/cargo" "test" "--color" "never" "--quiet" "--jobs" "1" "--no-fail-fast" "--target-dir" "/Users/eric/Proj/rust/ui_test/target/ui/tests/integrations/basic" "--manifest-path" "tests/integrations/basic/Cargo.toml"

error: pass test got exit status: 101, but expected 0

full stderr:
Error: tests failed

Location:
    /Users/eric/Proj/rust/ui_test/src/lib.rs:310:13
error: test failed, to rerun pass `--test ui_tests`

Caused by:
  process didn't exit successfully: `/Users/eric/Proj/rust/ui_test/target/ui/tests/integrations/basic/debug/deps/ui_tests-43d30a08ecf8c2ba` (exit status: 1)
error: 1 target failed:
    `--test ui_tests`

full stdout:

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s


running 3 tests
...
test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 2.85s

Building dependencies ... ok
Building aux file tests/actual_tests/auxiliary/derive_proc_macro.rs ... ok
tests/actual_tests/aux_derive.rs ... ok
Building aux file tests/actual_tests/auxiliary/the_proc_macro.rs ... ok
tests/actual_tests/aux_proc_macro.rs ... ok
tests/actual_tests/dep_derive.rs ... ok
tests/actual_tests/error_above.rs ... ok
tests/actual_tests/executable.rs ... ok
tests/actual_tests/foomp-rustfix.rs ... ok
tests/actual_tests/foomp.rs ... ok
tests/actual_tests/joined_above.rs ... FAILED
tests/actual_tests/joined_below.rs ... FAILED
tests/actual_tests/joined_mixed.rs ... FAILED
tests/actual_tests/mac_span.rs ... ok
tests/actual_tests/match_diagnostic_code.rs ... ok
tests/actual_tests/no_rustfix.rs ... ok
tests/actual_tests/stdin.rs ... ok
tests/actual_tests/unicode.rs ... ok
tests/actual_tests/windows_paths.rs ... ok
tests/actual_tests/subdir/aux_proc_macro.rs ... ok

FAILED TEST: tests/actual_tests/joined_above.rs
command: "rustc" "--error-format=json" "--out-dir" "/Users/eric/Proj/rust/ui_test/tests/integrations/basic/../../../target/.tmpobQRri/tests/actual_tests" "tests/actual_tests/joined_above.fixed" "--extern" "serde_derive=/Users/eric/Proj/rust/ui_test/tests/integrations/basic/../../../target/.tmpobQRri/debug/deps/libserde_derive-f57f7b7b75be9e67.dylib" "--extern" "basic=/Users/eric/Proj/rust/ui_test/tests/integrations/basic/../../../target/.tmpobQRri/aarch64-apple-darwin/debug/libbasic.rlib" "--extern" "basic=/Users/eric/Proj/rust/ui_test/tests/integrations/basic/../../../target/.tmpobQRri/aarch64-apple-darwin/debug/deps/libbasic-0a5b077303e4b85e.rmeta" "-L" "/Users/eric/Proj/rust/ui_test/tests/integrations/basic/../../../target/.tmpobQRri/aarch64-apple-darwin/debug" "-L" "/Users/eric/Proj/rust/ui_test/tests/integrations/basic/../../../target/.tmpobQRri/debug/build/proc-macro2-c56662e4d43c7009" "-L" "/Users/eric/Proj/rust/ui_test/tests/integrations/basic/../../../target/.tmpobQRri/debug/deps" "-L" "/Users/eric/Proj/rust/ui_test/tests/integrations/basic/../../../target/.tmpobQRri/aarch64-apple-darwin/debug/deps" "--edition" "2021" "--crate-name" "joined_above"

error: rustfix failed with exit status: 1

full stderr:
error: unused variable: `x`
 --> tests/actual_tests/joined_above.fixed:6:9
  |
6 |     let x = 0u32;
  |         ^ help: if this is intentional, prefix it with an underscore: `_x`
  |
note: the lint level is defined here
 --> tests/actual_tests/joined_above.fixed:1:21
  |
1 | #![deny(unused_mut, unused_variables)]
  |                     ^^^^^^^^^^^^^^^^

error: aborting due to 1 previous error


full stdout:



FAILED TEST: tests/actual_tests/joined_below.rs
command: "rustc" "--error-format=json" "--out-dir" "/Users/eric/Proj/rust/ui_test/tests/integrations/basic/../../../target/.tmpobQRri/tests/actual_tests" "tests/actual_tests/joined_below.fixed" "--extern" "serde_derive=/Users/eric/Proj/rust/ui_test/tests/integrations/basic/../../../target/.tmpobQRri/debug/deps/libserde_derive-f57f7b7b75be9e67.dylib" "--extern" "basic=/Users/eric/Proj/rust/ui_test/tests/integrations/basic/../../../target/.tmpobQRri/aarch64-apple-darwin/debug/libbasic.rlib" "--extern" "basic=/Users/eric/Proj/rust/ui_test/tests/integrations/basic/../../../target/.tmpobQRri/aarch64-apple-darwin/debug/deps/libbasic-0a5b077303e4b85e.rmeta" "-L" "/Users/eric/Proj/rust/ui_test/tests/integrations/basic/../../../target/.tmpobQRri/aarch64-apple-darwin/debug" "-L" "/Users/eric/Proj/rust/ui_test/tests/integrations/basic/../../../target/.tmpobQRri/debug/build/proc-macro2-c56662e4d43c7009" "-L" "/Users/eric/Proj/rust/ui_test/tests/integrations/basic/../../../target/.tmpobQRri/debug/deps" "-L" "/Users/eric/Proj/rust/ui_test/tests/integrations/basic/../../../target/.tmpobQRri/aarch64-apple-darwin/debug/deps" "--edition" "2021" "--crate-name" "joined_below"

error: rustfix failed with exit status: 1

full stderr:
error: unused variable: `x`
 --> tests/actual_tests/joined_below.fixed:4:9
  |
4 |     let x = 0u32;
  |         ^ help: if this is intentional, prefix it with an underscore: `_x`
  |
note: the lint level is defined here
 --> tests/actual_tests/joined_below.fixed:1:21
  |
1 | #![deny(unused_mut, unused_variables)]
  |                     ^^^^^^^^^^^^^^^^

error: aborting due to 1 previous error


full stdout:



FAILED TEST: tests/actual_tests/joined_mixed.rs
command: "rustc" "--error-format=json" "--out-dir" "/Users/eric/Proj/rust/ui_test/tests/integrations/basic/../../../target/.tmpobQRri/tests/actual_tests" "tests/actual_tests/joined_mixed.fixed" "--extern" "serde_derive=/Users/eric/Proj/rust/ui_test/tests/integrations/basic/../../../target/.tmpobQRri/debug/deps/libserde_derive-f57f7b7b75be9e67.dylib" "--extern" "basic=/Users/eric/Proj/rust/ui_test/tests/integrations/basic/../../../target/.tmpobQRri/aarch64-apple-darwin/debug/libbasic.rlib" "--extern" "basic=/Users/eric/Proj/rust/ui_test/tests/integrations/basic/../../../target/.tmpobQRri/aarch64-apple-darwin/debug/deps/libbasic-0a5b077303e4b85e.rmeta" "-L" "/Users/eric/Proj/rust/ui_test/tests/integrations/basic/../../../target/.tmpobQRri/aarch64-apple-darwin/debug" "-L" "/Users/eric/Proj/rust/ui_test/tests/integrations/basic/../../../target/.tmpobQRri/debug/build/proc-macro2-c56662e4d43c7009" "-L" "/Users/eric/Proj/rust/ui_test/tests/integrations/basic/../../../target/.tmpobQRri/debug/deps" "-L" "/Users/eric/Proj/rust/ui_test/tests/integrations/basic/../../../target/.tmpobQRri/aarch64-apple-darwin/debug/deps" "--edition" "2021" "--crate-name" "joined_mixed"

error: rustfix failed with exit status: 1

full stderr:
error: unused variable: `x`
 --> tests/actual_tests/joined_mixed.fixed:4:9
  |
4 |     let x = 0u32;
  |         ^ help: if this is intentional, prefix it with an underscore: `_x`
  |
note: the lint level is defined here
 --> tests/actual_tests/joined_mixed.fixed:1:21
  |
1 | #![deny(unused_mut, unused_variables)]
  |                     ^^^^^^^^^^^^^^^^

error: unused variable: `y`
  --> tests/actual_tests/joined_mixed.fixed:10:9
   |
10 |     let y = 0u32;
   |         ^ help: if this is intentional, prefix it with an underscore: `_y`

error: aborting due to 2 previous errors


full stdout:


FAILURES:
    tests/actual_tests/joined_above.rs
    tests/actual_tests/joined_below.rs
    tests/actual_tests/joined_mixed.rs

test result: FAIL. 3 failed; 14 passed;


running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s



FAILURES:
    tests/integrations/basic/Cargo.toml

test result: FAIL. 1 failed; 4 passed; 5 filtered out;

Error: tests failed

Location:
    /Users/eric/Proj/rust/ui_test/src/lib.rs:310:13
error: test failed, to rerun pass `--test integration`

Caused by:
  process didn't exit successfully: `/Users/eric/Proj/rust/ui_test/target/debug/deps/integration-2e04e0a1a5df77ee` (exit status: 1)

Pretty much all it says is rustfix failed with exit status: 1 which doesn't really say what went wrong or how to fix it.

@oli-obk
Copy link
Owner

oli-obk commented Apr 15, 2024

Oh yea, what this wants to say is that the rustfixed program still errors

@oli-obk oli-obk mentioned this issue Apr 30, 2024
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants