Skip to content

Commit 646714e

Browse files
committed
Do not normalize unconditionally in lower_const_arg
1 parent edbff13 commit 646714e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

compiler/rustc_hir_typeck/src/expr.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1718,7 +1718,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
17181718
let count_span = count.span();
17191719
let count = self.try_structurally_resolve_const(
17201720
count_span,
1721-
self.lower_const_arg(count, FeedConstTy::No),
1721+
self.normalize(count_span, self.lower_const_arg(count, FeedConstTy::No)),
17221722
);
17231723

17241724
if let Some(count) = count.try_to_target_usize(tcx) {

compiler/rustc_hir_typeck/src/fn_ctxt/_impl.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -497,7 +497,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
497497
self.tcx.hir().span(const_arg.hir_id),
498498
ObligationCauseCode::WellFormed(None),
499499
);
500-
self.normalize(const_arg.span(), ct)
500+
ct
501501
}
502502

503503
// If the type given by the user has free regions, save it for later, since

0 commit comments

Comments
 (0)