mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 00:03:43 +00:00
Remove some unintended changes to imports
This commit is contained in:
parent
2e4a0e37e6
commit
c8457e60e8
@ -8,10 +8,10 @@ use rustc_ast::ast::ParamKindOrd;
|
|||||||
use rustc_errors::{
|
use rustc_errors::{
|
||||||
codes::*, struct_span_code_err, Applicability, Diag, ErrorGuaranteed, MultiSpan,
|
codes::*, struct_span_code_err, Applicability, Diag, ErrorGuaranteed, MultiSpan,
|
||||||
};
|
};
|
||||||
|
use rustc_hir as hir;
|
||||||
use rustc_hir::def::{DefKind, Res};
|
use rustc_hir::def::{DefKind, Res};
|
||||||
use rustc_hir::def_id::DefId;
|
use rustc_hir::def_id::DefId;
|
||||||
use rustc_hir::{self as hir};
|
use rustc_hir::GenericArg;
|
||||||
use rustc_hir::{ConstArgKind, GenericArg};
|
|
||||||
use rustc_middle::ty::{
|
use rustc_middle::ty::{
|
||||||
self, GenericArgsRef, GenericParamDef, GenericParamDefKind, IsSuggestable, Ty,
|
self, GenericArgsRef, GenericParamDef, GenericParamDefKind, IsSuggestable, Ty,
|
||||||
};
|
};
|
||||||
@ -115,7 +115,7 @@ fn generic_arg_mismatch_err(
|
|||||||
(GenericArg::Const(cnst), GenericParamDefKind::Type { .. }) => {
|
(GenericArg::Const(cnst), GenericParamDefKind::Type { .. }) => {
|
||||||
// FIXME(min_generic_const_args): once ConstArgKind::Path is used for non-params too,
|
// FIXME(min_generic_const_args): once ConstArgKind::Path is used for non-params too,
|
||||||
// this should match against that instead of ::Anon
|
// 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 body = tcx.hir().body(anon.body)
|
||||||
&& let rustc_hir::ExprKind::Path(rustc_hir::QPath::Resolved(_, path)) =
|
&& let rustc_hir::ExprKind::Path(rustc_hir::QPath::Resolved(_, path)) =
|
||||||
body.value.kind
|
body.value.kind
|
||||||
|
@ -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::Breaks::{Consistent, Inconsistent};
|
||||||
use rustc_ast_pretty::pp::{self, Breaks};
|
use rustc_ast_pretty::pp::{self, Breaks};
|
||||||
use rustc_ast_pretty::pprust::{Comments, PrintState};
|
use rustc_ast_pretty::pprust::{Comments, PrintState};
|
||||||
use rustc_hir::{self as hir, ConstArgKind};
|
use rustc_hir as hir;
|
||||||
use rustc_hir::{
|
use rustc_hir::{
|
||||||
BindingMode, ByRef, GenericArg, GenericBound, GenericParam, GenericParamKind, HirId,
|
BindingMode, ByRef, ConstArgKind, GenericArg, GenericBound, GenericParam, GenericParamKind,
|
||||||
LifetimeParamKind, Node, PatKind, PreciseCapturingArg, RangeEnd, Term, TraitBoundModifier,
|
HirId, LifetimeParamKind, Node, PatKind, PreciseCapturingArg, RangeEnd, Term,
|
||||||
|
TraitBoundModifier,
|
||||||
};
|
};
|
||||||
use rustc_span::source_map::SourceMap;
|
use rustc_span::source_map::SourceMap;
|
||||||
use rustc_span::symbol::{kw, Ident, Symbol};
|
use rustc_span::symbol::{kw, Ident, Symbol};
|
||||||
|
@ -5,10 +5,10 @@ use crate::rvalue_scopes;
|
|||||||
use crate::{BreakableCtxt, Diverges, Expectation, FnCtxt, LoweredTy};
|
use crate::{BreakableCtxt, Diverges, Expectation, FnCtxt, LoweredTy};
|
||||||
use rustc_data_structures::fx::FxHashSet;
|
use rustc_data_structures::fx::FxHashSet;
|
||||||
use rustc_errors::{Applicability, Diag, ErrorGuaranteed, MultiSpan, StashKey};
|
use rustc_errors::{Applicability, Diag, ErrorGuaranteed, MultiSpan, StashKey};
|
||||||
|
use rustc_hir as hir;
|
||||||
use rustc_hir::def::{CtorOf, DefKind, Res};
|
use rustc_hir::def::{CtorOf, DefKind, Res};
|
||||||
use rustc_hir::def_id::DefId;
|
use rustc_hir::def_id::DefId;
|
||||||
use rustc_hir::lang_items::LangItem;
|
use rustc_hir::lang_items::LangItem;
|
||||||
use rustc_hir::{self as hir};
|
|
||||||
use rustc_hir::{ExprKind, GenericArg, HirId, Node, QPath};
|
use rustc_hir::{ExprKind, GenericArg, HirId, Node, QPath};
|
||||||
use rustc_hir_analysis::hir_ty_lowering::errors::GenericsArgsErrExtend;
|
use rustc_hir_analysis::hir_ty_lowering::errors::GenericsArgsErrExtend;
|
||||||
use rustc_hir_analysis::hir_ty_lowering::generics::{
|
use rustc_hir_analysis::hir_ty_lowering::generics::{
|
||||||
|
@ -36,10 +36,10 @@ use rustc_ast::tokenstream::{TokenStream, TokenTree};
|
|||||||
use rustc_attr as attr;
|
use rustc_attr as attr;
|
||||||
use rustc_data_structures::fx::{FxHashMap, FxHashSet, FxIndexMap, FxIndexSet, IndexEntry};
|
use rustc_data_structures::fx::{FxHashMap, FxHashSet, FxIndexMap, FxIndexSet, IndexEntry};
|
||||||
use rustc_errors::{codes::*, struct_span_code_err, FatalError};
|
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::{CtorKind, DefKind, Res};
|
||||||
use rustc_hir::def_id::{DefId, DefIdMap, DefIdSet, LocalDefId, LOCAL_CRATE};
|
use rustc_hir::def_id::{DefId, DefIdMap, DefIdSet, LocalDefId, LOCAL_CRATE};
|
||||||
use rustc_hir::PredicateOrigin;
|
use rustc_hir::PredicateOrigin;
|
||||||
use rustc_hir::{self as hir, ConstArgKind};
|
|
||||||
use rustc_hir_analysis::lower_ty;
|
use rustc_hir_analysis::lower_ty;
|
||||||
use rustc_middle::metadata::Reexport;
|
use rustc_middle::metadata::Reexport;
|
||||||
use rustc_middle::middle::resolve_bound_vars as rbv;
|
use rustc_middle::middle::resolve_bound_vars as rbv;
|
||||||
@ -289,10 +289,12 @@ pub(crate) fn clean_const<'tcx>(
|
|||||||
_cx: &mut DocContext<'tcx>,
|
_cx: &mut DocContext<'tcx>,
|
||||||
) -> Constant {
|
) -> Constant {
|
||||||
match &constant.kind {
|
match &constant.kind {
|
||||||
ConstArgKind::Path(qpath) => {
|
hir::ConstArgKind::Path(qpath) => {
|
||||||
Constant { kind: ConstantKind::Path { path: qpath_to_string(&qpath).into() } }
|
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 } }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user