about summary refs log tree commit diff
diff options
context:
space:
mode:
authorNoah Lev <camelidcamel@gmail.com>2024-07-17 20:20:18 -0700
committerNoah Lev <camelidcamel@gmail.com>2024-07-17 20:31:37 -0700
commitc8457e60e8a1bbade7f8aa34d3646c392a4237b6 (patch)
tree93ca01c312800333d91868124ffd998faa1e9c40
parent2e4a0e37e68beded4bdc473ecd8e94899e2eccc2 (diff)
downloadrust-c8457e60e8a1bbade7f8aa34d3646c392a4237b6.tar.gz
rust-c8457e60e8a1bbade7f8aa34d3646c392a4237b6.zip
Remove some unintended changes to imports
-rw-r--r--compiler/rustc_hir_analysis/src/hir_ty_lowering/generics.rs6
-rw-r--r--compiler/rustc_hir_pretty/src/lib.rs7
-rw-r--r--compiler/rustc_hir_typeck/src/fn_ctxt/_impl.rs2
-rw-r--r--src/librustdoc/clean/mod.rs8
4 files changed, 13 insertions, 10 deletions
diff --git a/compiler/rustc_hir_analysis/src/hir_ty_lowering/generics.rs b/compiler/rustc_hir_analysis/src/hir_ty_lowering/generics.rs
index b351e31964b..abe2cff321f 100644
--- a/compiler/rustc_hir_analysis/src/hir_ty_lowering/generics.rs
+++ b/compiler/rustc_hir_analysis/src/hir_ty_lowering/generics.rs
@@ -8,10 +8,10 @@ use rustc_ast::ast::ParamKindOrd;
 use rustc_errors::{
     codes::*, struct_span_code_err, Applicability, Diag, ErrorGuaranteed, MultiSpan,
 };
+use rustc_hir as hir;
 use rustc_hir::def::{DefKind, Res};
 use rustc_hir::def_id::DefId;
-use rustc_hir::{self as hir};
-use rustc_hir::{ConstArgKind, GenericArg};
+use rustc_hir::GenericArg;
 use rustc_middle::ty::{
     self, GenericArgsRef, GenericParamDef, GenericParamDefKind, IsSuggestable, Ty,
 };
@@ -115,7 +115,7 @@ fn generic_arg_mismatch_err(
         (GenericArg::Const(cnst), GenericParamDefKind::Type { .. }) => {
             // FIXME(min_generic_const_args): once ConstArgKind::Path is used for non-params too,
             // this should match against that instead of ::Anon
-            if let ConstArgKind::Anon(anon) = cnst.kind
+            if let hir::ConstArgKind::Anon(anon) = cnst.kind
                 && let body = tcx.hir().body(anon.body)
                 && let rustc_hir::ExprKind::Path(rustc_hir::QPath::Resolved(_, path)) =
                     body.value.kind
diff --git a/compiler/rustc_hir_pretty/src/lib.rs b/compiler/rustc_hir_pretty/src/lib.rs
index bbb7d31dbc5..db5eba0d9eb 100644
--- a/compiler/rustc_hir_pretty/src/lib.rs
+++ b/compiler/rustc_hir_pretty/src/lib.rs
@@ -10,10 +10,11 @@ use rustc_ast::util::parser::{self, AssocOp, Fixity};
 use rustc_ast_pretty::pp::Breaks::{Consistent, Inconsistent};
 use rustc_ast_pretty::pp::{self, Breaks};
 use rustc_ast_pretty::pprust::{Comments, PrintState};
-use rustc_hir::{self as hir, ConstArgKind};
+use rustc_hir as hir;
 use rustc_hir::{
-    BindingMode, ByRef, GenericArg, GenericBound, GenericParam, GenericParamKind, HirId,
-    LifetimeParamKind, Node, PatKind, PreciseCapturingArg, RangeEnd, Term, TraitBoundModifier,
+    BindingMode, ByRef, ConstArgKind, GenericArg, GenericBound, GenericParam, GenericParamKind,
+    HirId, LifetimeParamKind, Node, PatKind, PreciseCapturingArg, RangeEnd, Term,
+    TraitBoundModifier,
 };
 use rustc_span::source_map::SourceMap;
 use rustc_span::symbol::{kw, Ident, Symbol};
diff --git a/compiler/rustc_hir_typeck/src/fn_ctxt/_impl.rs b/compiler/rustc_hir_typeck/src/fn_ctxt/_impl.rs
index 76a6405ff45..cc2c1a302f5 100644
--- a/compiler/rustc_hir_typeck/src/fn_ctxt/_impl.rs
+++ b/compiler/rustc_hir_typeck/src/fn_ctxt/_impl.rs
@@ -5,10 +5,10 @@ use crate::rvalue_scopes;
 use crate::{BreakableCtxt, Diverges, Expectation, FnCtxt, LoweredTy};
 use rustc_data_structures::fx::FxHashSet;
 use rustc_errors::{Applicability, Diag, ErrorGuaranteed, MultiSpan, StashKey};
+use rustc_hir as hir;
 use rustc_hir::def::{CtorOf, DefKind, Res};
 use rustc_hir::def_id::DefId;
 use rustc_hir::lang_items::LangItem;
-use rustc_hir::{self as hir};
 use rustc_hir::{ExprKind, GenericArg, HirId, Node, QPath};
 use rustc_hir_analysis::hir_ty_lowering::errors::GenericsArgsErrExtend;
 use rustc_hir_analysis::hir_ty_lowering::generics::{
diff --git a/src/librustdoc/clean/mod.rs b/src/librustdoc/clean/mod.rs
index ee5c95c3cc3..e3c4602212c 100644
--- a/src/librustdoc/clean/mod.rs
+++ b/src/librustdoc/clean/mod.rs
@@ -36,10 +36,10 @@ use rustc_ast::tokenstream::{TokenStream, TokenTree};
 use rustc_attr as attr;
 use rustc_data_structures::fx::{FxHashMap, FxHashSet, FxIndexMap, FxIndexSet, IndexEntry};
 use rustc_errors::{codes::*, struct_span_code_err, FatalError};
+use rustc_hir as hir;
 use rustc_hir::def::{CtorKind, DefKind, Res};
 use rustc_hir::def_id::{DefId, DefIdMap, DefIdSet, LocalDefId, LOCAL_CRATE};
 use rustc_hir::PredicateOrigin;
-use rustc_hir::{self as hir, ConstArgKind};
 use rustc_hir_analysis::lower_ty;
 use rustc_middle::metadata::Reexport;
 use rustc_middle::middle::resolve_bound_vars as rbv;
@@ -289,10 +289,12 @@ pub(crate) fn clean_const<'tcx>(
     _cx: &mut DocContext<'tcx>,
 ) -> Constant {
     match &constant.kind {
-        ConstArgKind::Path(qpath) => {
+        hir::ConstArgKind::Path(qpath) => {
             Constant { kind: ConstantKind::Path { path: qpath_to_string(&qpath).into() } }
         }
-        ConstArgKind::Anon(anon) => Constant { kind: ConstantKind::Anonymous { body: anon.body } },
+        hir::ConstArgKind::Anon(anon) => {
+            Constant { kind: ConstantKind::Anonymous { body: anon.body } }
+        }
     }
 }