]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_lint/builtin.rs
Auto merge of #75120 - JulianKnodt:rm_reps, r=oli-obk
[rust.git] / src / librustc_lint / builtin.rs
index 97830e6c86f39eef373c547ee2515fb35f6c93c0..36eb272cdfc8dcaa9534316c682a052a620105db 100644 (file)
 use crate::{
     types::CItemKind, EarlyContext, EarlyLintPass, LateContext, LateLintPass, LintContext,
 };
-use rustc_ast::ast::{self, Expr};
 use rustc_ast::attr::{self, HasAttrs};
 use rustc_ast::tokenstream::{TokenStream, TokenTree};
 use rustc_ast::visit::{FnCtxt, FnKind};
+use rustc_ast::{self as ast, *};
 use rustc_ast_pretty::pprust::{self, expr_to_string};
 use rustc_data_structures::fx::{FxHashMap, FxHashSet};
 use rustc_errors::{Applicability, DiagnosticBuilder, DiagnosticStyledString};
@@ -1287,7 +1287,7 @@ fn check_pat(&mut self, cx: &EarlyContext<'_>, pat: &ast::Pat) {
             return;
         }
 
-        use self::ast::{PatKind, RangeEnd, RangeSyntax::DotDotDot};
+        use self::ast::{PatKind, RangeSyntax::DotDotDot};
 
         /// If `pat` is a `...` pattern, return the start and end of the range, as well as the span
         /// corresponding to the ellipsis.
@@ -1860,7 +1860,7 @@ enum InitKind {
         /// Test if this constant is all-0.
         fn is_zero(expr: &hir::Expr<'_>) -> bool {
             use hir::ExprKind::*;
-            use rustc_ast::ast::LitKind::*;
+            use rustc_ast::LitKind::*;
             match &expr.kind {
                 Lit(lit) => {
                     if let Int(i, _) = lit.node {