add a flag to codegen fn attrs for foreign items

This commit is contained in:
Jana Dönszelmann 2025-08-25 18:52:57 +02:00
parent 20e3f49d4f
commit 79f3ae4b72

View file

@ -190,5 +190,5 @@ impl<'tcx> LateLintPass<'tcx> for MissingInline {
/// and a rustc warning would be triggered, see #15301
fn fn_is_externally_exported(cx: &LateContext<'_>, def_id: DefId) -> bool {
let attrs = cx.tcx.codegen_fn_attrs(def_id);
attrs.contains_extern_indicator(cx.tcx, def_id)
attrs.contains_extern_indicator()
}