diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2025-01-19 01:22:38 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-01-19 01:22:38 +0100 |
| commit | e28e2b801efa9dda16f1fb6a33756bdc4b12d04c (patch) | |
| tree | b8da366deaebc154528c18ed5e9e4e1e8c030eeb /compiler/rustc_mir_transform/src/errors.rs | |
| parent | 7e1ce54b22b918bd5a5cf3864c83f1c22e53d9fc (diff) | |
| parent | b08f3d5bdb264aba8d81e6e13ebe498bd6a6bb12 (diff) | |
| download | rust-e28e2b801efa9dda16f1fb6a33756bdc4b12d04c.tar.gz rust-e28e2b801efa9dda16f1fb6a33756bdc4b12d04c.zip | |
Rollup merge of #135705 - compiler-errors:lint, r=estebank
Consolidate ad-hoc MIR lints into real pass-manager-based MIR lints It feels much cleaner to do all MIR-related things using the pass manager.
Diffstat (limited to 'compiler/rustc_mir_transform/src/errors.rs')
| -rw-r--r-- | compiler/rustc_mir_transform/src/errors.rs | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/compiler/rustc_mir_transform/src/errors.rs b/compiler/rustc_mir_transform/src/errors.rs index 015633d145f..a2fd46043ca 100644 --- a/compiler/rustc_mir_transform/src/errors.rs +++ b/compiler/rustc_mir_transform/src/errors.rs @@ -10,6 +10,28 @@ use rustc_span::{Span, Symbol}; use crate::fluent_generated as fluent; #[derive(LintDiagnostic)] +#[diag(mir_transform_unconditional_recursion)] +#[help] +pub(crate) struct UnconditionalRecursion { + #[label] + pub(crate) span: Span, + #[label(mir_transform_unconditional_recursion_call_site_label)] + pub(crate) call_sites: Vec<Span>, +} + +#[derive(Diagnostic)] +#[diag(mir_transform_force_inline_attr)] +#[note] +pub(crate) struct InvalidForceInline { + #[primary_span] + pub attr_span: Span, + #[label(mir_transform_callee)] + pub callee_span: Span, + pub callee: String, + pub reason: &'static str, +} + +#[derive(LintDiagnostic)] pub(crate) enum ConstMutate { #[diag(mir_transform_const_modify)] #[note] |
