diff options
| author | bors <bors@rust-lang.org> | 2025-06-18 17:57:27 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2025-06-18 17:57:27 +0000 |
| commit | c68340350c78eea402c4a85f8d9c1b7d3d607635 (patch) | |
| tree | 5d77e6bfdd82420258d6fa01410d31a7c10eb5fb /compiler/rustc_metadata/src | |
| parent | f9c15f40fbd7b4ba1baea6fb89551274047e17b3 (diff) | |
| parent | a0a6db2496239a9d55b5b5cf765a561580610c96 (diff) | |
Auto merge of #142685 - Kobzol:rollup-8f3g8yf, r=Kobzol
Rollup of 11 pull requests Successful merges: - rust-lang/rust#140774 (Affirm `-Cforce-frame-pointers=off` does not override) - rust-lang/rust#141610 (Stabilize `feature(generic_arg_infer)`) - rust-lang/rust#142383 (CodeGen: rework Aggregate implemention for rvalue_creates_operand cases) - rust-lang/rust#142591 (Add spawn APIs for BootstrapCommand to support deferred command execution) - rust-lang/rust#142619 (apply clippy::or_fun_call) - rust-lang/rust#142624 (Actually take `--build` into account in bootstrap) - rust-lang/rust#142627 (Add `StepMetadata` to describe steps) - rust-lang/rust#142660 (remove joboet from review rotation) - rust-lang/rust#142666 (Skip tidy triagebot linkcheck if `triagebot.toml` doesn't exist) - rust-lang/rust#142672 (Clarify bootstrap tools description) - rust-lang/rust#142674 (remove duplicate crash test) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_metadata/src')
| -rw-r--r-- | compiler/rustc_metadata/src/locator.rs | 8 | ||||
| -rw-r--r-- | compiler/rustc_metadata/src/native_libs.rs | 2 |
2 files changed, 7 insertions, 3 deletions
diff --git a/compiler/rustc_metadata/src/locator.rs b/compiler/rustc_metadata/src/locator.rs index 79015aab5d3..259bcb1b96d 100644 --- a/compiler/rustc_metadata/src/locator.rs +++ b/compiler/rustc_metadata/src/locator.rs @@ -1196,7 +1196,7 @@ impl CrateError { .opts .crate_name .clone() - .unwrap_or("<unknown>".to_string()), + .unwrap_or_else(|| "<unknown>".to_string()), is_nightly_build: sess.is_nightly_build(), profiler_runtime: Symbol::intern(&sess.opts.unstable_opts.profiler_runtime), locator_triple: locator.triple, @@ -1217,7 +1217,11 @@ impl CrateError { crate_name, add_info: String::new(), missing_core, - current_crate: sess.opts.crate_name.clone().unwrap_or("<unknown>".to_string()), + current_crate: sess + .opts + .crate_name + .clone() + .unwrap_or_else(|| "<unknown>".to_string()), is_nightly_build: sess.is_nightly_build(), profiler_runtime: Symbol::intern(&sess.opts.unstable_opts.profiler_runtime), locator_triple: sess.opts.target_triple.clone(), diff --git a/compiler/rustc_metadata/src/native_libs.rs b/compiler/rustc_metadata/src/native_libs.rs index 5cdeb8935f7..f10d71f4c65 100644 --- a/compiler/rustc_metadata/src/native_libs.rs +++ b/compiler/rustc_metadata/src/native_libs.rs @@ -705,7 +705,7 @@ impl<'tcx> Collector<'tcx> { .map_or(import_name_type, |ord| Some(PeImportNameType::Ordinal(ord))); DllImport { - name: codegen_fn_attrs.link_name.unwrap_or(self.tcx.item_name(item)), + name: codegen_fn_attrs.link_name.unwrap_or_else(|| self.tcx.item_name(item)), import_name_type, calling_convention, span, |
