Add a scheme for moving away from extern "rust-intrinsic"
entirely
This commit is contained in:
parent
f2612daf58
commit
1e57df1969
16 changed files with 131 additions and 8 deletions
|
@ -1019,6 +1019,11 @@ fn should_codegen_locally<'tcx>(tcx: TyCtxt<'tcx>, instance: &Instance<'tcx>) ->
|
|||
return false;
|
||||
}
|
||||
|
||||
if tcx.has_attr(def_id, sym::rustc_intrinsic_must_be_overridden) {
|
||||
// These are implemented by backends directly and have no meaningful body.
|
||||
return false;
|
||||
}
|
||||
|
||||
if def_id.is_local() {
|
||||
// Local items cannot be referred to locally without monomorphizing them locally.
|
||||
return true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue