rust/compiler/rustc_parse/src
León Orell Valerian Liehr 5628786484
Rollup merge of #121237 - Urgau:better-cargo-heuristic, r=compiler-errors
Use better heuristic for printing Cargo specific diagnostics

It was [reported](https://github.com/rust-lang/rust/issues/82450#issuecomment-1948574677) in the check-cfg call for testing that the Rust for Linux project is setting the `CARGO` env without compiling with it, which is an issue since we are using the `CARGO` env as a proxy for "was launched from Cargo".

This PR switch to the `CARGO_CRATE_NAME` [Cargo env](https://doc.rust-lang.org/cargo/reference/environment-variables.html#environment-variables-cargo-sets-for-crates), which shouldn't collide (as much) with other build systems. I also took the opportunity to consolidate all the checks under the same function.
2024-02-18 05:10:18 +01:00
..
lexer Add ErrorGuaranteed to ast::LitKind::Err, token::LitKind::Err. 2024-02-15 14:46:08 +11:00
parser Rollup merge of #121231 - matthiaskrgr:cloone, r=compiler-errors 2024-02-17 18:47:43 +01:00
errors.rs Use better heuristic for printing Cargo specific diagnostics 2024-02-17 16:49:01 +01:00
lib.rs Invert diagnostic lints. 2024-02-06 13:12:33 +11:00
validate_attr.rs Add ErrorGuaranteed to ast::LitKind::Err, token::LitKind::Err. 2024-02-15 14:46:08 +11:00