-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Open
Labels
A-diagnosticsArea: Error and warning messages generated by Cargo itself.Area: Error and warning messages generated by Cargo itself.C-bugCategory: bugCategory: bugS-needs-designStatus: Needs someone to work further on the design for the feature or fix. NOT YET accepted.Status: Needs someone to work further on the design for the feature or fix. NOT YET accepted.
Description
Problem
When running cargo
with cargo +nightly check
the suggested cargo fix
command does not include +nightly
i.e.
warning: `scratch` (bin "scratch") generated 1 warning (run `cargo fix --bin "scratch"` to apply 1 suggestion)
It seems like a misstep to be showing the "command to run" but not having it include +nightly
.
Steps
- Have a nightly version of cargo installed
- Run
cargo new scratch && cd scratch
- Edit the main function to throw a machine-fixable warning
fn main() {
let test = 0;
}
- Run
cargo +nightly check
- Observe the warning line
Possible Solution(s)
- No Change
- Just refer to the command, not saying how to run it
- Try to detect the use of
rustup
and which toolchain is being used and specify the+
(which might be redundant withrustup-toolchain.toml
) - Do a modified version of
cargo test
:to apply 1 suggestion pass '...' to cargo-fix
Notes
No response
Version
cargo 1.68.0-nightly (8c460b223 2023-01-04)
release: 1.68.0-nightly
commit-hash: 8c460b2237a6359a7e3335890db8da049bdd62fc
commit-date: 2023-01-04
host: aarch64-apple-darwin
libgit2: 1.5.0 (sys:0.15.0 vendored)
libcurl: 7.85.0 (sys:0.4.59+curl-7.86.0 system ssl:(SecureTransport) LibreSSL/3.3.6)
os: Mac OS 13.1.0 [64-bit]
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Error and warning messages generated by Cargo itself.Area: Error and warning messages generated by Cargo itself.C-bugCategory: bugCategory: bugS-needs-designStatus: Needs someone to work further on the design for the feature or fix. NOT YET accepted.Status: Needs someone to work further on the design for the feature or fix. NOT YET accepted.