@@ -15,8 +15,8 @@ use rustc_middle::query::Providers;
15
15
use rustc_middle:: ty:: { RegisteredTools , TyCtxt } ;
16
16
use rustc_session:: Session ;
17
17
use rustc_session:: lint:: builtin:: {
18
- self , FORBIDDEN_LINT_GROUPS , RENAMED_AND_REMOVED_LINTS , SINGLE_USE_LIFETIMES ,
19
- UNFULFILLED_LINT_EXPECTATIONS , UNKNOWN_LINTS , UNUSED_ATTRIBUTES ,
18
+ self , RENAMED_AND_REMOVED_LINTS , SINGLE_USE_LIFETIMES , UNFULFILLED_LINT_EXPECTATIONS ,
19
+ UNKNOWN_LINTS , UNUSED_ATTRIBUTES ,
20
20
} ;
21
21
use rustc_session:: lint:: { Level , Lint , LintExpectationId , LintId } ;
22
22
use rustc_span:: symbol:: { Symbol , sym} ;
@@ -34,9 +34,8 @@ use crate::fluent_generated as fluent;
34
34
use crate :: late:: unerased_lint_store;
35
35
use crate :: lints:: {
36
36
DeprecatedLintName , DeprecatedLintNameFromCommandLine , IgnoredUnlessCrateSpecified ,
37
- OverruledAttributeLint , RemovedLint , RemovedLintFromCommandLine , RenamedLint ,
38
- RenamedLintFromCommandLine , RenamedLintSuggestion , UnknownLint , UnknownLintFromCommandLine ,
39
- UnknownLintSuggestion ,
37
+ RemovedLint , RemovedLintFromCommandLine , RenamedLint , RenamedLintFromCommandLine ,
38
+ RenamedLintSuggestion , UnknownLint , UnknownLintFromCommandLine , UnknownLintSuggestion ,
40
39
} ;
41
40
42
41
/// Collection of lint levels for the whole crate.
@@ -645,16 +644,13 @@ impl<'s, P: LintLevelsProvider> LintLevelsBuilder<'s, P> {
645
644
sub,
646
645
} ) ;
647
646
} else {
648
- self . emit_span_lint (
649
- FORBIDDEN_LINT_GROUPS ,
650
- src. span ( ) . into ( ) ,
651
- OverruledAttributeLint {
652
- overruled : src. span ( ) ,
653
- lint_level : level. as_str ( ) ,
654
- lint_source : src. name ( ) ,
655
- sub,
656
- } ,
657
- ) ;
647
+ self . sess . dcx ( ) . emit_err ( OverruledAttribute {
648
+ span : src. span ( ) ,
649
+ overruled : src. span ( ) ,
650
+ lint_level : level. as_str ( ) ,
651
+ lint_source : src. name ( ) ,
652
+ sub,
653
+ } ) ;
658
654
}
659
655
660
656
// Retain the forbid lint level, unless we are
0 commit comments