Auto merge of #136481 - jieyouxu:rollup-w0lnnqb, r=jieyouxu
Rollup of 8 pull requests Successful merges: - #136356 (Docs for f16 and f128: correct a typo and add details) - #136404 (Remove a footgun-y feature / relic of the past from the compiletest DSL) - #136432 (LTA: Actually check where-clauses for well-formedness at the def site) - #136438 (miri: improve error when offset_from preconditions are violated) - #136441 ([`compiletest`-related cleanups 1/7] Cleanup `is_rustdoc` logic and remove a useless path join in rustdoc-json runtest logic) - #136455 (Remove some `Clone` bounds and derives.) - #136464 (Remove hook calling via `TyCtxtAt`.) - #136467 (override default config profile on tarballs) r? `@ghost` `@rustbot` modify labels: rollup
This commit is contained in:
commit
534d79adf9
33 changed files with 251 additions and 143 deletions
|
@ -953,7 +953,7 @@ fn visit_instance_use<'tcx>(
|
|||
|
||||
/// Returns `true` if we should codegen an instance in the local crate, or returns `false` if we
|
||||
/// can just link to the upstream crate and therefore don't need a mono item.
|
||||
fn should_codegen_locally<'tcx>(tcx: TyCtxtAt<'tcx>, instance: Instance<'tcx>) -> bool {
|
||||
fn should_codegen_locally<'tcx>(tcx: TyCtxt<'tcx>, instance: Instance<'tcx>) -> bool {
|
||||
let Some(def_id) = instance.def.def_id_if_not_guaranteed_local_codegen() else {
|
||||
return true;
|
||||
};
|
||||
|
@ -976,7 +976,7 @@ fn should_codegen_locally<'tcx>(tcx: TyCtxtAt<'tcx>, instance: Instance<'tcx>) -
|
|||
return true;
|
||||
}
|
||||
|
||||
if tcx.is_reachable_non_generic(def_id) || instance.upstream_monomorphization(*tcx).is_some() {
|
||||
if tcx.is_reachable_non_generic(def_id) || instance.upstream_monomorphization(tcx).is_some() {
|
||||
// We can link to the item in question, no instance needed in this crate.
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue