Skip to content

Instantly share code, notes, and snippets.

@NoraCodes
Created May 14, 2021 21:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NoraCodes/5f15f8674e391529954a759d3a5fa58b to your computer and use it in GitHub Desktop.
Save NoraCodes/5f15f8674e391529954a759d3a5fa58b to your computer and use it in GitHub Desktop.
Output from antisamples ambiguous-path test
antisamples nora/samples-2018 % TESTNAME=ambiguous-path cargo test --test runtests -- --nocapture
Finished test [unoptimized + debuginfo] target(s) in 0.02s
Running target/debug/deps/runtests-dd41841cefb91125
running 1 test
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 8 filtered out; finished in 0.03s
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 9 filtered out; finished in 0.02s
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 4 filtered out; finished in 0.00s
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 8 filtered out; finished in 0.00s
running 1 test
executing "rustc" "crates/ambiguous-path.rs" "-L" "/tmp" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-C" "prefer-dynamic" "-o" "/tmp/ambiguous-path.stage-id" "-A" "unused" "--edition" "2018" "--extern" "image" "-L" "/home/nora/src/programming-in-rust-meta/tests/antisamples/target/debug/deps" "-L" "/home/nora/src/programming-in-rust-meta/tests/antisamples/target/debug" "-L" "/home/nora/.rustup/toolchains/1.50.0-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-L" "/home/nora/.rustup/toolchains/1.50.0-x86_64-unknown-linux-gnu/lib" "-L" "/tmp/ambiguous-path.stage-id.aux"
------stdout------------------------------
------stderr------------------------------
{"message":"multiple matching crates for `image`","code":{"code":"E0464","explanation":null},"level":"error","spans":[{"file_name":"crates/ambiguous-path.rs","byte_start":233,"byte_end":238,"line_start":12,"line_end":12,"column_start":5,"column_end":10,"is_primary":true,"text":[{"text":"use image::Pixels;","highlight_start":5,"highlight_end":10}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"candidates:\ncrate `image`: /home/nora/src/programming-in-rust-meta/tests/antisamples/target/debug/deps/libimage-d181a0edf5aade74.rlib","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"error[E0464]: multiple matching crates for `image`\n --> crates/ambiguous-path.rs:12:5\n |\n12 | use image::Pixels;\n | ^^^^^\n |\n = note: candidates:\n crate `image`: /home/nora/src/programming-in-rust-meta/tests/antisamples/target/debug/deps/libimage-d181a0edf5aade74.rlib\n\n"}
{"message":"aborting due to previous error","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to previous error\n\n"}
------------------------------------------
error: crates/ambiguous-path.rs:12: unexpected error: '12:5: 12:10: multiple matching crates for `image` [E0464]'
error: crates/ambiguous-path.rs:12: expected error not found: unresolved import `image::Pixels`
error: crates/ambiguous-path.rs:12: expected error not found: `image` is ambiguous (name vs any other name during import resolution)
error: 1 unexpected errors found, 2 expected errors not found
status: exit code: 1
command: "rustc" "crates/ambiguous-path.rs" "-L" "/tmp" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-C" "prefer-dynamic" "-o" "/tmp/ambiguous-path.stage-id" "-A" "unused" "--edition" "2018" "--extern" "image" "-L" "/home/nora/src/programming-in-rust-meta/tests/antisamples/target/debug/deps" "-L" "/home/nora/src/programming-in-rust-meta/tests/antisamples/target/debug" "-L" "/home/nora/.rustup/toolchains/1.50.0-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-L" "/home/nora/.rustup/toolchains/1.50.0-x86_64-unknown-linux-gnu/lib" "-L" "/tmp/ambiguous-path.stage-id.aux"
unexpected errors (from JSON output): [
Error {
line_num: 12,
kind: Some(
Error,
),
msg: "12:5: 12:10: multiple matching crates for `image` [E0464]",
},
]
not found errors (from test file): [
Error {
line_num: 12,
kind: Some(
Error,
),
msg: "unresolved import `image::Pixels`",
},
Error {
line_num: 12,
kind: Some(
Error,
),
msg: "`image` is ambiguous (name vs any other name during import resolution)",
},
]
thread '[compile-fail] crates/ambiguous-path.rs' panicked at 'explicit panic', /home/nora/.cargo/git/checkouts/compiletest-rs-82982e624baa7685/bc2ff25/src/runtest.rs:1092:13
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
test [compile-fail] crates/ambiguous-path.rs ... FAILED
failures:
failures:
[compile-fail] crates/ambiguous-path.rs
test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 7 filtered out; finished in 0.14s
thread 'compile_test' panicked at 'Some tests failed', /home/nora/.cargo/git/checkouts/compiletest-rs-82982e624baa7685/bc2ff25/src/lib.rs:105:22
test compile_test ... FAILED
failures:
failures:
compile_test
test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.23s
error: test failed, to rerun pass '--test runtests'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment