Skip to content

Commit c3a0cba

Browse files
committed
initial cleanup
1 parent 93d15b9 commit c3a0cba

File tree

7 files changed

+11
-8
lines changed

7 files changed

+11
-8
lines changed

src/librustc_feature/active.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -558,7 +558,7 @@ declare_features! (
558558

559559
/// Allow negative trait implementations.
560560
(active, negative_impls, "1.44.0", Some(68318), None),
561-
561+
562562
/// Lazily evaluate constants. Which allows constants to depend on type parameters.
563563
(active, lazy_normalization_consts, "1.44.0", Some(60471), None),
564564

src/librustc_infer/infer/nll_relate/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -595,8 +595,8 @@ where
595595
b = self.infcx.shallow_resolve(b);
596596
}
597597

598-
match (a.val, b.val) {
599-
(_, ty::ConstKind::Infer(InferConst::Var(_))) if D::forbid_inference_vars() => {
598+
match b.val {
599+
ty::ConstKind::Infer(InferConst::Var(_)) if D::forbid_inference_vars() => {
600600
// Forbid inference variables in the RHS.
601601
bug!("unexpected inference var {:?}", b)
602602
}

src/librustc_session/options.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -870,7 +870,7 @@ options! {DebuggingOptions, DebuggingSetter, basic_debugging_options,
870870
instrument_mcount: bool = (false, parse_bool, [TRACKED],
871871
"insert function instrument code for mcount-based tracing (default: no)"),
872872
keep_hygiene_data: bool = (false, parse_bool, [UNTRACKED],
873-
"lazily evaluate constants (experimental)"),
873+
"keep hygiene data after analysis (default: no)"),
874874
link_native_libraries: bool = (true, parse_bool, [UNTRACKED],
875875
"link native libraries in the linker invocation (default: yes)"),
876876
link_only: bool = (false, parse_bool, [TRACKED],

src/librustc_trait_selection/traits/error_reporting/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -616,7 +616,6 @@ impl<'a, 'tcx> InferCtxtExt<'tcx> for InferCtxt<'a, 'tcx> {
616616
)
617617
}
618618

619-
620619
ty::Predicate::ConstEquate(..) => {
621620
// Errors for `ConstEquate` predicates show up as
622621
// `SelectionError::ConstEvalFailure`,

src/librustc_trait_selection/traits/fulfill.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -539,7 +539,10 @@ impl<'a, 'b, 'tcx> ObligationProcessor for FulfillProcessor<'a, 'b, 'tcx> {
539539
Ok(val) => Ok(Const::from_value(self.selcx.tcx(), val, c.ty)),
540540
Err(ErrorHandled::TooGeneric) => {
541541
stalled_on.append(
542-
&mut substs.types().filter_map(|ty| TyOrConstInferVar::maybe_from_ty(ty)).collect(),
542+
&mut substs
543+
.types()
544+
.filter_map(|ty| TyOrConstInferVar::maybe_from_ty(ty))
545+
.collect(),
543546
);
544547
Err(ProcessResult::Unchanged)
545548
}

src/librustc_trait_selection/traits/object_safety.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ use rustc_errors::{Applicability, FatalError};
1717
use rustc_hir as hir;
1818
use rustc_hir::def_id::DefId;
1919
use rustc_middle::ty::subst::{GenericArg, InternalSubsts, Subst};
20-
use rustc_middle::ty::{self, Predicate, ToPredicate, Ty, TyCtxt, TypeFoldable, TypeVisitor, WithConstness};
20+
use rustc_middle::ty::{self, Ty, TyCtxt, TypeFoldable, TypeVisitor, WithConstness};
21+
use rustc_middle::ty::{Predicate, ToPredicate};
2122
use rustc_session::lint::builtin::WHERE_CLAUSES_OBJECT_SAFETY;
2223
use rustc_span::symbol::Symbol;
2324
use rustc_span::Span;

src/librustc_typeck/collect.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1168,7 +1168,7 @@ fn generics_of(tcx: TyCtxt<'_>, def_id: DefId) -> ty::Generics {
11681168
Node::AnonConst(_) => {
11691169
if tcx.features().lazy_normalization_consts {
11701170
let parent_id = tcx.hir().get_parent_item(hir_id);
1171-
Some(tcx.hir().local_def_id(parent_id))
1171+
Some(tcx.hir().local_def_id(parent_id).to_def_id())
11721172
} else {
11731173
None
11741174
}

0 commit comments

Comments
 (0)