rustc_intrinsic: support functions without body; they are implicitly marked as must-be-overridden
This commit is contained in:
parent
be65012aa3
commit
3cd3649c6c
19 changed files with 118 additions and 68 deletions
|
@ -190,7 +190,8 @@ impl<'tcx> Inliner<'tcx> {
|
|||
|
||||
// Intrinsic fallback bodies are automatically made cross-crate inlineable,
|
||||
// but at this stage we don't know whether codegen knows the intrinsic,
|
||||
// so just conservatively don't inline it.
|
||||
// so just conservatively don't inline it. This also ensures that we do not
|
||||
// accidentally inline the body of an intrinsic that *must* be overridden.
|
||||
if self.tcx.has_attr(callsite.callee.def_id(), sym::rustc_intrinsic) {
|
||||
return Err("Callee is an intrinsic, do not inline fallback bodies");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue