diff options
| author | Trevor Gross <tmgross@umich.edu> | 2024-07-30 23:04:23 -0400 |
|---|---|---|
| committer | Trevor Gross <tmgross@umich.edu> | 2025-06-12 07:57:12 +0000 |
| commit | 841f7ce69ac503fb9566deeefbbd273c1587f4e6 (patch) | |
| tree | 287ebf2ad29bbaa5af7669b894864bef1c5ebb9d /compiler/rustc_lint/src | |
| parent | 208cb5da15d5a8378efff6d44a5ffa53fd51bbbc (diff) | |
Make `missing_fragment_specifier` an unconditional error
This was attempted in [1] then reverted in [2] because of fallout. Recently, this was made an edition-dependent error in [3]. Make missing fragment specifiers an unconditional error again. [1]: https://github.com/rust-lang/rust/pull/75516 [2]: https://github.com/rust-lang/rust/pull/80210 [3]: https://github.com/rust-lang/rust/pull/128006
Diffstat (limited to 'compiler/rustc_lint/src')
| -rw-r--r-- | compiler/rustc_lint/src/early/diagnostics.rs | 3 | ||||
| -rw-r--r-- | compiler/rustc_lint/src/lib.rs | 5 | ||||
| -rw-r--r-- | compiler/rustc_lint/src/lints.rs | 4 |
3 files changed, 5 insertions, 7 deletions
diff --git a/compiler/rustc_lint/src/early/diagnostics.rs b/compiler/rustc_lint/src/early/diagnostics.rs index 60c477dd6c7..3b0a36186b6 100644 --- a/compiler/rustc_lint/src/early/diagnostics.rs +++ b/compiler/rustc_lint/src/early/diagnostics.rs @@ -432,9 +432,6 @@ pub fn decorate_builtin_lint( BuiltinLintDiag::CfgAttrNoAttributes => { lints::CfgAttrNoAttributes.decorate_lint(diag); } - BuiltinLintDiag::MissingFragmentSpecifier => { - lints::MissingFragmentSpecifier.decorate_lint(diag); - } BuiltinLintDiag::MetaVariableStillRepeating(name) => { lints::MetaVariableStillRepeating { name }.decorate_lint(diag); } diff --git a/compiler/rustc_lint/src/lib.rs b/compiler/rustc_lint/src/lib.rs index 72bfeaddbf1..547539d7273 100644 --- a/compiler/rustc_lint/src/lib.rs +++ b/compiler/rustc_lint/src/lib.rs @@ -619,6 +619,11 @@ fn register_builtins(store: &mut LintStore) { "converted into hard error, \ see <https://github.com/rust-lang/rust/issues/116558> for more information", ); + store.register_removed( + "missing_fragment_specifier", + "converted into hard error, \ + see <https://github.com/rust-lang/rust/issues/40107> for more information", + ); } fn register_internals(store: &mut LintStore) { diff --git a/compiler/rustc_lint/src/lints.rs b/compiler/rustc_lint/src/lints.rs index 9d3c74a9a2b..25acde53367 100644 --- a/compiler/rustc_lint/src/lints.rs +++ b/compiler/rustc_lint/src/lints.rs @@ -2617,10 +2617,6 @@ pub(crate) struct DuplicateMacroAttribute; pub(crate) struct CfgAttrNoAttributes; #[derive(LintDiagnostic)] -#[diag(lint_missing_fragment_specifier)] -pub(crate) struct MissingFragmentSpecifier; - -#[derive(LintDiagnostic)] #[diag(lint_metavariable_still_repeating)] pub(crate) struct MetaVariableStillRepeating { pub name: MacroRulesNormalizedIdent, |
