We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When running tests in tests/pass-dep/shims/libc-misc.rs, the error message produced by the test is displayed in json format.
tests/pass-dep/shims/libc-misc.rs
use std::ffi::CString;
./miri run --dep tests/pass-dep/shims/libc-misc.rs -Zmiri-disable-isolation
$ rustfmt +miri --edition=2021 --config-path /home/byt/Documents/miri/rustfmt.toml --unstable-features --skip-children ... $ cargo +miri clippy --manifest-path /home/byt/Documents/miri/Cargo.toml --all-targets Finished `dev` profile [optimized + debuginfo] target(s) in 0.07s $ cargo +miri clippy --manifest-path /home/byt/Documents/miri/cargo-miri/Cargo.toml --all-targets Finished `dev` profile [optimized + debuginfo] target(s) in 0.02s $ cargo +miri clippy --manifest-path /home/byt/Documents/miri/miri-script/Cargo.toml --all-targets Finished `dev` profile [optimized + debuginfo] target(s) in 0.01s {"$message_type":"diagnostic","message":"unused import: `CString`","code":{"code":"unused_imports","explanation":null},"level":"warning","spans":[{"file_name":"tests/pass-dep/shims/libc-misc.rs","byte_start":6845,"byte_end":6852,"line_start":218,"line_end":218,"column_start":26,"column_end":33,"is_primary":true,"text":[{"text":" use std::ffi::{CStr, CString};","highlight_start":26,"highlight_end":33}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"`#[warn(unused_imports)]` on by default","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"remove the unused import","code":null,"level":"help","spans":[{"file_name":"tests/pass-dep/shims/libc-misc.rs","byte_start":6843,"byte_end":6852,"line_start":218,"line_end":218,"column_start":24,"column_end":33,"is_primary":true,"text":[{"text":" use std::ffi::{CStr, CString};","highlight_start":24,"highlight_end":33}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"warning: unused import: `CString`\n --> tests/pass-dep/shims/libc-misc.rs:218:26\n |\n218 | use std::ffi::{CStr, CString};\n | ^^^^^^^\n |\n = note: `#[warn(unused_imports)]` on by default\n\n"}
rustc 1.79.0-nightly (23d47dba3 2024-04-06) binary: rustc commit-hash: 23d47dba319331d4418827cfbb8c1af283497d3c commit-date: 2024-04-06 host: x86_64-unknown-linux-gnu release: 1.79.0-nightly LLVM version: 18.1.2 os: Ubuntu 22.04.4 LTS [64-bit]
The text was updated successfully, but these errors were encountered:
This is somehow related to --dep mode, it doesn't happen for "normal" --run.
--dep
--run
Sorry, something went wrong.
fcd2f0b
Thanks for the quick fix!
Auto merge of rust-lang#3465 - RalfJung:run-dep-error-format, r=RalfJung
34ab668
fix error display for './miri run --dep' Fixes rust-lang/miri#3463
Successfully merging a pull request may close this issue.
Problem
When running tests in
tests/pass-dep/shims/libc-misc.rs
, the error message produced by the test is displayed in json format.Reproduce:
tests/pass-dep/shims/libc-misc.rs
, I added unused imports below:./miri run --dep tests/pass-dep/shims/libc-misc.rs -Zmiri-disable-isolation
Version:
The text was updated successfully, but these errors were encountered: