File tree Expand file tree Collapse file tree 3 files changed +5
-18
lines changed Expand file tree Collapse file tree 3 files changed +5
-18
lines changed Original file line number Diff line number Diff line change @@ -433,12 +433,10 @@ fn late_lint_crate<'tcx>(tcx: TyCtxt<'tcx>) {
433
433
LintPass :: get_lints ( pass) . iter ( ) . any ( |& lint| hashmap. contains ( & LintId :: of ( lint) ) )
434
434
} ) . collect ( ) ;
435
435
436
- // let mut passes: Vec<std::boxed::Box<dyn LateLintPass<'tcx>>> = passes
437
- // .into_iter()
438
- // .filter(|pass| {
439
- // LintPass::get_lints(pass).iter().any(|&lint| )
440
- // })
441
- // .collect();
436
+ // filtered_passes may be empty in case of `#[allow(all)]`
437
+ if filtered_passes. is_empty ( ) {
438
+ return ;
439
+ }
442
440
443
441
let pass = RuntimeCombinedLateLintPass { passes : & mut filtered_passes[ ..] } ;
444
442
late_lint_crate_inner ( tcx, context, pass) ;
Original file line number Diff line number Diff line change @@ -162,19 +162,11 @@ pub fn lints_that_can_emit(
162
162
) -> Vec < LintId > {
163
163
let store = unerased_lint_store ( & tcx. sess ) ;
164
164
165
- // let mut builder = LintLevelsBuilder {
166
- // sess: tcx.sess,
167
- // features: tcx.features(),
168
- // provider:
169
- // warn_about_weird_lints: false,
170
- // store,
171
- // registered_tools: &tcx.registered_tools(()),
172
- // };
173
165
let specs = tcx. shallow_lint_levels_on ( hir:: CRATE_HIR_ID . owner ) ;
174
166
let lints = store. get_lints ( ) ;
175
167
176
168
let mut hashmap: Vec < LintId > = Vec :: new ( ) ;
177
- hashmap. reserve ( ( lints. len ( ) >> 1 ) * usize:: from ( tcx. sess . opts . lint_cap . is_some ( ) ) ) ; // Avoid allocations, it's better to
169
+ hashmap. reserve ( ( lints. len ( ) >> 1 ) * usize:: from ( tcx. sess . opts . lint_cap . is_some ( ) ) ) ; // Avoid allocations
178
170
179
171
for & lint in lints {
180
172
let lint_id = LintId :: of ( lint) ;
Original file line number Diff line number Diff line change @@ -137,9 +137,6 @@ pub fn provide(providers: &mut Providers) {
137
137
}
138
138
139
139
fn lint_mod ( tcx : TyCtxt < ' _ > , module_def_id : LocalModDefId ) {
140
- if let Some ( lint_cap) = tcx. sess . opts . lint_cap && lint_cap == Level :: Allow {
141
- return ;
142
- }
143
140
late_lint_mod ( tcx, module_def_id, BuiltinCombinedModuleLateLintPass :: new ( ) ) ;
144
141
}
145
142
You can’t perform that action at this time.
0 commit comments