1
Fork 0

mir_build: check annotated functions w/out callers

This commit is contained in:
David Wood 2025-01-07 11:27:04 +00:00
parent ce602acfc2
commit cc9a9ecccb
No known key found for this signature in database
16 changed files with 223 additions and 98 deletions

View file

@ -1107,3 +1107,15 @@ impl<'a> Subdiagnostic for Rust2024IncompatiblePatSugg<'a> {
);
}
}
#[derive(Diagnostic)]
#[diag(mir_build_force_inline)]
#[note]
pub(crate) struct InvalidForceInline {
#[primary_span]
pub attr_span: Span,
#[label(mir_build_callee)]
pub callee_span: Span,
pub callee: String,
pub reason: &'static str,
}