Use local key in providers

This commit is contained in:
Michael Goulet
2023-03-13 18:54:05 +00:00
parent a01b4cc9f3
commit 2eb1c08e43
65 changed files with 458 additions and 395 deletions

View File

@@ -30,7 +30,7 @@ fn check_mod_naked_functions(tcx: TyCtxt<'_>, module_def_id: LocalDefId) {
continue;
}
let naked = tcx.has_attr(def_id.to_def_id(), sym::naked);
let naked = tcx.has_attr(def_id, sym::naked);
if !naked {
continue;
}
@@ -59,7 +59,7 @@ fn check_mod_naked_functions(tcx: TyCtxt<'_>, module_def_id: LocalDefId) {
/// Check that the function isn't inlined.
fn check_inline(tcx: TyCtxt<'_>, def_id: LocalDefId) {
let attrs = tcx.get_attrs(def_id.to_def_id(), sym::inline);
let attrs = tcx.get_attrs(def_id, sym::inline);
for attr in attrs {
tcx.sess.emit_err(CannotInlineNakedFunction { span: attr.span });
}