1
Fork 0

remove #[cmse_nonsecure_entry]

This commit is contained in:
Folkert 2024-07-31 21:04:06 +02:00 committed by Folkert de Vries
parent 1ddd67a79a
commit 5722a80782
23 changed files with 50 additions and 162 deletions

View file

@ -188,9 +188,6 @@ impl<'tcx> CheckAttrVisitor<'tcx> {
| [sym::rustc_must_implement_one_of, ..]
| [sym::rustc_deny_explicit_impl, ..]
| [sym::const_trait, ..] => self.check_must_be_applied_to_trait(attr, span, target),
[sym::cmse_nonsecure_entry, ..] => {
self.check_cmse_nonsecure_entry(hir_id, attr, span, target)
}
[sym::collapse_debuginfo, ..] => self.check_collapse_debuginfo(attr, span, target),
[sym::must_not_suspend, ..] => self.check_must_not_suspend(attr, span, target),
[sym::must_use, ..] => self.check_must_use(hir_id, attr, target),
@ -563,27 +560,6 @@ impl<'tcx> CheckAttrVisitor<'tcx> {
}
}
/// Checks if `#[cmse_nonsecure_entry]` is applied to a function definition.
fn check_cmse_nonsecure_entry(
&self,
hir_id: HirId,
attr: &Attribute,
span: Span,
target: Target,
) {
match target {
Target::Fn
| Target::Method(MethodKind::Trait { body: true } | MethodKind::Inherent) => {}
_ => {
self.dcx().emit_err(errors::AttrShouldBeAppliedToFn {
attr_span: attr.span,
defn_span: span,
on_crate: hir_id == CRATE_HIR_ID,
});
}
}
}
/// Debugging aid for `object_lifetime_default` query.
fn check_object_lifetime_default(&self, hir_id: HirId) {
let tcx = self.tcx;