Skip to content

Commit 0e714c1

Browse files
committed
rustc_trans: always use normalizing_infer_ctxt.
1 parent 281cfb9 commit 0e714c1

File tree

3 files changed

+17
-2
lines changed

3 files changed

+17
-2
lines changed

src/librustc_trans/trans/_match.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1351,7 +1351,7 @@ fn is_discr_reassigned(bcx: Block, discr: &ast::Expr, body: &ast::Expr) -> bool
13511351
reassigned: false
13521352
};
13531353
{
1354-
let infcx = infer::new_infer_ctxt(bcx.tcx(), &bcx.tcx().tables, None, false);
1354+
let infcx = infer::normalizing_infer_ctxt(bcx.tcx(), &bcx.tcx().tables);
13551355
let mut visitor = euv::ExprUseVisitor::new(&mut rc, &infcx);
13561356
visitor.walk_expr(body);
13571357
}

src/librustc_trans/trans/common.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -936,7 +936,7 @@ pub fn normalize_and_test_predicates<'a, 'tcx>(ccx: &CrateContext<'a, 'tcx>,
936936
predicates);
937937

938938
let tcx = ccx.tcx();
939-
let infcx = infer::new_infer_ctxt(tcx, &tcx.tables, None, true);
939+
let infcx = infer::normalizing_infer_ctxt(tcx, &tcx.tables);
940940
let mut selcx = traits::SelectionContext::new(&infcx);
941941
let mut fulfill_cx = infcx.fulfillment_cx.borrow_mut();
942942
let cause = traits::ObligationCause::dummy();

src/test/run-pass/issue-26805.rs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
2+
// file at the top-level directory of this distribution and at
3+
// http://rust-lang.org/COPYRIGHT.
4+
//
5+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+
// option. This file may not be copied, modified, or distributed
9+
// except according to those terms.
10+
11+
struct NonOrd;
12+
13+
fn main() {
14+
let _: Box<Iterator<Item = _>> = Box::new(vec![NonOrd].into_iter());
15+
}

0 commit comments

Comments
 (0)