diff options
| author | Folkert <folkert@folkertdev.nl> | 2024-07-17 10:42:24 +0200 |
|---|---|---|
| committer | Folkert <folkert@folkertdev.nl> | 2024-07-27 12:55:39 +0200 |
| commit | c6a166bac269eda77b595fdc8ff7290e1372c147 (patch) | |
| tree | 46b7764813f597d7df6c2de3e89bb8a319b3ed24 /compiler/rustc_passes/src/errors.rs | |
| parent | 4d082b77af1f714df6c407785e1961a9dddd554c (diff) | |
| download | rust-c6a166bac269eda77b595fdc8ff7290e1372c147.tar.gz rust-c6a166bac269eda77b595fdc8ff7290e1372c147.zip | |
switch to an allowlist approach
- merge error codes - use attribute name that is incompatible in error message - add test for conditional incompatible attribute - add `linkage` to the allowlist
Diffstat (limited to 'compiler/rustc_passes/src/errors.rs')
| -rw-r--r-- | compiler/rustc_passes/src/errors.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/rustc_passes/src/errors.rs b/compiler/rustc_passes/src/errors.rs index b6be096b43b..b195ba973ce 100644 --- a/compiler/rustc_passes/src/errors.rs +++ b/compiler/rustc_passes/src/errors.rs @@ -1183,13 +1183,14 @@ pub struct NakedFunctionsMustUseNoreturn { } #[derive(Diagnostic)] -#[diag(passes_naked_functions_codegen_attribute, code = E0736)] -pub struct NakedFunctionCodegenAttribute { +#[diag(passes_naked_functions_incompatible_attribute, code = E0736)] +pub struct NakedFunctionIncompatibleAttribute { #[primary_span] #[label] pub span: Span, #[label(passes_naked_attribute)] pub naked_span: Span, + pub attr: Symbol, } #[derive(Diagnostic)] |
