about summary refs log tree commit diff
path: root/compiler/rustc_parse/src/errors.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-02-18 06:02:16 +0000
committerbors <bors@rust-lang.org>2024-02-18 06:02:16 +0000
commit23a3d777c8a95715977608c827de63e7738fa228 (patch)
tree5949d078451a4e3375461cbd56d7992ac6ef41c9 /compiler/rustc_parse/src/errors.rs
parentd3df8ff85121146f2ac5e863e0c9eaba4bf35d32 (diff)
parent5628786484217e92f511c74b0a0427ff71562e43 (diff)
downloadrust-23a3d777c8a95715977608c827de63e7738fa228.tar.gz
rust-23a3d777c8a95715977608c827de63e7738fa228.zip
Auto merge of #121252 - fmease:rollup-x7zogl8, r=fmease
Rollup of 7 pull requests

Successful merges:

 - #120526 (rustdoc: Correctly handle long crate names on mobile)
 - #121100 (Detect when method call on argument could be removed to fulfill failed trait bound)
 - #121160 (rustdoc: fix and refactor HTML rendering a bit)
 - #121198 (Add more checks for `unnamed_fields` during HIR analysis)
 - #121218 (Fix missing trait impls for type in rustc docs)
 - #121221 (AstConv: Refactor lowering of associated item bindings a bit)
 - #121237 (Use better heuristic for printing Cargo specific diagnostics)

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_parse/src/errors.rs')
-rw-r--r--compiler/rustc_parse/src/errors.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_parse/src/errors.rs b/compiler/rustc_parse/src/errors.rs
index 3c3a8d6fbb9..674f7218ea6 100644
--- a/compiler/rustc_parse/src/errors.rs
+++ b/compiler/rustc_parse/src/errors.rs
@@ -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 }