diff options
| author | Eduard-Mihai Burtescu <edy.burt@gmail.com> | 2017-04-24 18:06:39 +0300 |
|---|---|---|
| committer | Eduard-Mihai Burtescu <edy.burt@gmail.com> | 2017-04-24 18:06:39 +0300 |
| commit | decf7598ef3a245ddaed9272091b3afc3466617f (patch) | |
| tree | 537cf185b8c1c8b3ddd32e43261fdbdbb621c823 /src/librustc/middle | |
| parent | 9bde6b6d96ccb76825c8e3bca54c28727ceeed63 (diff) | |
| download | rust-decf7598ef3a245ddaed9272091b3afc3466617f.tar.gz rust-decf7598ef3a245ddaed9272091b3afc3466617f.zip | |
rustc: use tcx.at(span) to set the location of a query.
Diffstat (limited to 'src/librustc/middle')
| -rw-r--r-- | src/librustc/middle/const_val.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/librustc/middle/const_val.rs b/src/librustc/middle/const_val.rs index ec7b3c4dd8d..74026abe64d 100644 --- a/src/librustc/middle/const_val.rs +++ b/src/librustc/middle/const_val.rs @@ -14,7 +14,7 @@ pub use rustc_const_math::ConstInt; use hir; use hir::def::Def; use hir::def_id::DefId; -use ty::{self, TyCtxt}; +use ty::TyCtxt; use ty::subst::Substs; use util::common::ErrorReported; use rustc_const_math::*; @@ -228,7 +228,7 @@ pub fn eval_length(tcx: TyCtxt, let count_expr = &tcx.hir.body(count).value; let count_def_id = tcx.hir.body_owner_def_id(count); let substs = Substs::empty(); - match ty::queries::const_eval::get(tcx, count_expr.span, (count_def_id, substs)) { + match tcx.at(count_expr.span).const_eval((count_def_id, substs)) { Ok(Integral(Usize(count))) => { let val = count.as_u64(tcx.sess.target.uint_type); assert_eq!(val as usize as u64, val); |
