diff options
| author | bors <bors@rust-lang.org> | 2024-02-18 06:02:16 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-02-18 06:02:16 +0000 |
| commit | 23a3d777c8a95715977608c827de63e7738fa228 (patch) | |
| tree | 5949d078451a4e3375461cbd56d7992ac6ef41c9 /compiler/rustc_codegen_ssa/src/errors.rs | |
| parent | d3df8ff85121146f2ac5e863e0c9eaba4bf35d32 (diff) | |
| parent | 5628786484217e92f511c74b0a0427ff71562e43 (diff) | |
| download | rust-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_codegen_ssa/src/errors.rs')
| -rw-r--r-- | compiler/rustc_codegen_ssa/src/errors.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/compiler/rustc_codegen_ssa/src/errors.rs b/compiler/rustc_codegen_ssa/src/errors.rs index 3d7903b5efb..e42a8bd9ed9 100644 --- a/compiler/rustc_codegen_ssa/src/errors.rs +++ b/compiler/rustc_codegen_ssa/src/errors.rs @@ -362,8 +362,11 @@ impl<G: EmissionGuarantee> IntoDiagnostic<'_, G> for LinkingFailed<'_> { // which by now we have no way to translate. if contains_undefined_ref { diag.note(fluent::codegen_ssa_extern_funcs_not_found) - .note(fluent::codegen_ssa_specify_libraries_to_link) - .note(fluent::codegen_ssa_use_cargo_directive); + .note(fluent::codegen_ssa_specify_libraries_to_link); + + if rustc_session::utils::was_invoked_from_cargo() { + diag.note(fluent::codegen_ssa_use_cargo_directive); + } } diag } |
