Skip to content

Commit c8457e6

Browse files
committed
Remove some unintended changes to imports
1 parent 2e4a0e3 commit c8457e6

File tree

4 files changed

+13
-10
lines changed

4 files changed

+13
-10
lines changed

Diff for: compiler/rustc_hir_analysis/src/hir_ty_lowering/generics.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ use rustc_ast::ast::ParamKindOrd;
88
use rustc_errors::{
99
codes::*, struct_span_code_err, Applicability, Diag, ErrorGuaranteed, MultiSpan,
1010
};
11+
use rustc_hir as hir;
1112
use rustc_hir::def::{DefKind, Res};
1213
use rustc_hir::def_id::DefId;
13-
use rustc_hir::{self as hir};
14-
use rustc_hir::{ConstArgKind, GenericArg};
14+
use rustc_hir::GenericArg;
1515
use rustc_middle::ty::{
1616
self, GenericArgsRef, GenericParamDef, GenericParamDefKind, IsSuggestable, Ty,
1717
};
@@ -115,7 +115,7 @@ fn generic_arg_mismatch_err(
115115
(GenericArg::Const(cnst), GenericParamDefKind::Type { .. }) => {
116116
// FIXME(min_generic_const_args): once ConstArgKind::Path is used for non-params too,
117117
// this should match against that instead of ::Anon
118-
if let ConstArgKind::Anon(anon) = cnst.kind
118+
if let hir::ConstArgKind::Anon(anon) = cnst.kind
119119
&& let body = tcx.hir().body(anon.body)
120120
&& let rustc_hir::ExprKind::Path(rustc_hir::QPath::Resolved(_, path)) =
121121
body.value.kind

Diff for: compiler/rustc_hir_pretty/src/lib.rs

+4-3
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,11 @@ use rustc_ast::util::parser::{self, AssocOp, Fixity};
1010
use rustc_ast_pretty::pp::Breaks::{Consistent, Inconsistent};
1111
use rustc_ast_pretty::pp::{self, Breaks};
1212
use rustc_ast_pretty::pprust::{Comments, PrintState};
13-
use rustc_hir::{self as hir, ConstArgKind};
13+
use rustc_hir as hir;
1414
use rustc_hir::{
15-
BindingMode, ByRef, GenericArg, GenericBound, GenericParam, GenericParamKind, HirId,
16-
LifetimeParamKind, Node, PatKind, PreciseCapturingArg, RangeEnd, Term, TraitBoundModifier,
15+
BindingMode, ByRef, ConstArgKind, GenericArg, GenericBound, GenericParam, GenericParamKind,
16+
HirId, LifetimeParamKind, Node, PatKind, PreciseCapturingArg, RangeEnd, Term,
17+
TraitBoundModifier,
1718
};
1819
use rustc_span::source_map::SourceMap;
1920
use rustc_span::symbol::{kw, Ident, Symbol};

Diff for: compiler/rustc_hir_typeck/src/fn_ctxt/_impl.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ use crate::rvalue_scopes;
55
use crate::{BreakableCtxt, Diverges, Expectation, FnCtxt, LoweredTy};
66
use rustc_data_structures::fx::FxHashSet;
77
use rustc_errors::{Applicability, Diag, ErrorGuaranteed, MultiSpan, StashKey};
8+
use rustc_hir as hir;
89
use rustc_hir::def::{CtorOf, DefKind, Res};
910
use rustc_hir::def_id::DefId;
1011
use rustc_hir::lang_items::LangItem;
11-
use rustc_hir::{self as hir};
1212
use rustc_hir::{ExprKind, GenericArg, HirId, Node, QPath};
1313
use rustc_hir_analysis::hir_ty_lowering::errors::GenericsArgsErrExtend;
1414
use rustc_hir_analysis::hir_ty_lowering::generics::{

Diff for: src/librustdoc/clean/mod.rs

+5-3
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,10 @@ use rustc_ast::tokenstream::{TokenStream, TokenTree};
3636
use rustc_attr as attr;
3737
use rustc_data_structures::fx::{FxHashMap, FxHashSet, FxIndexMap, FxIndexSet, IndexEntry};
3838
use rustc_errors::{codes::*, struct_span_code_err, FatalError};
39+
use rustc_hir as hir;
3940
use rustc_hir::def::{CtorKind, DefKind, Res};
4041
use rustc_hir::def_id::{DefId, DefIdMap, DefIdSet, LocalDefId, LOCAL_CRATE};
4142
use rustc_hir::PredicateOrigin;
42-
use rustc_hir::{self as hir, ConstArgKind};
4343
use rustc_hir_analysis::lower_ty;
4444
use rustc_middle::metadata::Reexport;
4545
use rustc_middle::middle::resolve_bound_vars as rbv;
@@ -289,10 +289,12 @@ pub(crate) fn clean_const<'tcx>(
289289
_cx: &mut DocContext<'tcx>,
290290
) -> Constant {
291291
match &constant.kind {
292-
ConstArgKind::Path(qpath) => {
292+
hir::ConstArgKind::Path(qpath) => {
293293
Constant { kind: ConstantKind::Path { path: qpath_to_string(&qpath).into() } }
294294
}
295-
ConstArgKind::Anon(anon) => Constant { kind: ConstantKind::Anonymous { body: anon.body } },
295+
hir::ConstArgKind::Anon(anon) => {
296+
Constant { kind: ConstantKind::Anonymous { body: anon.body } }
297+
}
296298
}
297299
}
298300

0 commit comments

Comments
 (0)