diff options
| author | David Wood <david.wood2@arm.com> | 2025-01-07 11:27:04 +0000 |
|---|---|---|
| committer | David Wood <david.wood2@arm.com> | 2025-01-10 18:37:57 +0000 |
| commit | cc9a9ecccb2fbbb7687ed076e06411c2f4ac5fbb (patch) | |
| tree | c2ac8174b0be897938a5a801c58a97a87eee2b1d /compiler/rustc_mir_build/src/errors.rs | |
| parent | ce602acfc22724c30b6154f650225d2e1d1550ed (diff) | |
| download | rust-cc9a9ecccb2fbbb7687ed076e06411c2f4ac5fbb.tar.gz rust-cc9a9ecccb2fbbb7687ed076e06411c2f4ac5fbb.zip | |
mir_build: check annotated functions w/out callers
Diffstat (limited to 'compiler/rustc_mir_build/src/errors.rs')
| -rw-r--r-- | compiler/rustc_mir_build/src/errors.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/compiler/rustc_mir_build/src/errors.rs b/compiler/rustc_mir_build/src/errors.rs index 790d56860d2..90c31a2caa3 100644 --- a/compiler/rustc_mir_build/src/errors.rs +++ b/compiler/rustc_mir_build/src/errors.rs @@ -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, +} |
