@@ -520,53 +520,6 @@ impl<'tcx> LintLevelMinimum<'tcx> {
520
520
}
521
521
}
522
522
523
- // impl<'tcx> Visitor<'tcx> for LintLevelMinimum<'tcx> {
524
- // type NestedFilter = nested_filter::All;
525
-
526
- // fn nested_visit_map(&mut self) -> Self::Map {
527
- // self.tcx.hir()
528
- // }
529
-
530
- // fn visit_attribute(&mut self, attribute: &'tcx ast::Attribute) {
531
- // if let Some(meta) = attribute.meta() {
532
- // if [sym::warn, sym::deny, sym::forbid, sym::expect]
533
- // .iter()
534
- // .any(|kind| meta.has_name(*kind))
535
- // {
536
- // // SAFETY: Lint attributes are always a metalist inside a
537
- // // metalist (even with just one lint).
538
- // for meta_list in meta.meta_item_list().unwrap() {
539
- // // If it's a tool lint (e.g. clippy::my_clippy_lint)
540
- // if let ast::NestedMetaItem::MetaItem(meta_item) = meta_list {
541
- // if meta_item.path.segments.len() == 1 {
542
- // self.lints_to_emit.push(
543
- // // SAFETY: Lint attributes can only have literals
544
- // meta_list.ident().unwrap().name,
545
- // );
546
- // } else {
547
- // self.lints_to_emit.push(meta_item.path.segments[1].ident.name);
548
- // }
549
- // }
550
- // }
551
- // // We handle #![allow]s differently, as these remove checking rather than adding.
552
- // } else if meta.has_name(sym::allow)
553
- // && let ast::AttrStyle::Inner = attribute.style
554
- // {
555
- // for meta_list in meta.meta_item_list().unwrap() {
556
- // // If it's a tool lint (e.g. clippy::my_clippy_lint)
557
- // if let ast::NestedMetaItem::MetaItem(meta_item) = meta_list {
558
- // if meta_item.path.segments.len() == 1 {
559
- // self.lints_allowed.push(meta_list.name_or_empty())
560
- // } else {
561
- // self.lints_allowed.push(meta_item.path.segments[1].ident.name);
562
- // }
563
- // }
564
- // }
565
- // }
566
- // }
567
- // }
568
- // }
569
-
570
523
pub struct LintLevelsBuilder < ' s , P > {
571
524
sess : & ' s Session ,
572
525
features : & ' s Features ,
0 commit comments