10use crate::attributes::AttributeSafety;
11use crate::diagnostics::{
12▶ EmptyExportName, EmptySection, NakedFunctionIncompatibleAttribute, NullOnExport,
13 NullOnObjcClass, NullOnObjcSelector, NullOnSection, ObjcClassExpectedStringLiteral,
14 ObjcSelectorExpectedStringLiteral, SanitizeInvalidStatic, TargetFeatureOnLangItem,
· · ·
226 })];
227 const SAFETY: AttributeSafety = AttributeSafety::Unsafe {
228▶ note: "the `#[naked]` attribute adds the safety obligation that the function's body must respect the function’s calling convention, uphold its signature, and either return or diverge (i.e., not fall through past the end of the assembly code).",
229 unsafe_since: None,
230 };
· · ·
248 // * `#[test]`, `#[ignore]`, `#[should_panic]`
249 //
250▶ // NOTE: when making changes to this list, check that `error_codes/E0736.md` remains
251 // accurate.
252 const ALLOW_LIST: &[rustc_span::Symbol] = &[
· · ·
306
307 if other_attr.word_is(sym::target_feature) {
308▶ if !cx.features().naked_functions_target_feature() {
309 feature_err(
310 cx.sess(),
· · ·
311▶ sym::naked_functions_target_feature,
312 other_attr.span(),
313 "`#[target_feature(/* ... */)]` is currently unstable on `#[naked]` functions",
+ 10 more matches in this file