diff options
| author | Eduard-Mihai Burtescu <edy.burt@gmail.com> | 2017-02-20 03:55:28 +0200 |
|---|---|---|
| committer | Eduard-Mihai Burtescu <edy.burt@gmail.com> | 2017-02-25 18:35:26 +0200 |
| commit | d9f0a949fd6b74641b12afc0f8a17f00919ebcef (patch) | |
| tree | 6e05dba800cf05a891648e074cf6cd8782a0813f /src/librustc_const_eval | |
| parent | e7a48821c0d30ccd6b7ea88be24eed1bcba5f48a (diff) | |
rustc_const_eval: demand that the MIR qualify_consts ran on each evaluated body.
Diffstat (limited to 'src/librustc_const_eval')
| -rw-r--r-- | src/librustc_const_eval/eval.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/librustc_const_eval/eval.rs b/src/librustc_const_eval/eval.rs index 284991a11b1..c5d577ce571 100644 --- a/src/librustc_const_eval/eval.rs +++ b/src/librustc_const_eval/eval.rs @@ -27,7 +27,7 @@ use rustc::util::nodemap::DefIdMap; use graphviz::IntoCow; use syntax::ast; use rustc::hir::{self, Expr}; -use syntax_pos::Span; +use syntax_pos::{Span, DUMMY_SP}; use std::borrow::Cow; use std::cmp::Ordering; @@ -228,6 +228,7 @@ pub struct ConstContext<'a, 'tcx: 'a> { impl<'a, 'tcx> ConstContext<'a, 'tcx> { pub fn new(tcx: TyCtxt<'a, 'tcx, 'tcx>, body: hir::BodyId) -> Self { let def_id = tcx.hir.body_owner_def_id(body); + ty::queries::mir_const_qualif::get(tcx, DUMMY_SP, def_id); ConstContext::with_tables(tcx, tcx.item_tables(def_id)) } |
