Use better heuristic for printing Cargo specific diagnostics
This commit is contained in:
parent
bccb9bbb41
commit
d988d8f4ba
10 changed files with 34 additions and 13 deletions
|
@ -2545,7 +2545,7 @@ pub enum HelpUseLatestEdition {
|
|||
impl HelpUseLatestEdition {
|
||||
pub fn new() -> Self {
|
||||
let edition = LATEST_STABLE_EDITION;
|
||||
if std::env::var_os("CARGO").is_some() {
|
||||
if rustc_session::utils::was_invoked_from_cargo() {
|
||||
Self::Cargo { edition }
|
||||
} else {
|
||||
Self::Standalone { edition }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue