rustc: expose monomorphic const_eval through on-demand.

This commit is contained in:
Eduard-Mihai Burtescu 2017-04-14 19:00:08 +03:00
parent 8854164d0c
commit 63064ec190
13 changed files with 63 additions and 57 deletions

View file

@ -14,7 +14,6 @@ env_logger = { version = "0.4", default-features = false }
log = "0.3"
rustc = { path = "../librustc" }
rustc_back = { path = "../librustc_back" }
rustc_const_eval = { path = "../librustc_const_eval" }
rustc_data_structures = { path = "../librustc_data_structures" }
rustc_driver = { path = "../librustc_driver" }
rustc_errors = { path = "../librustc_errors" }

View file

@ -1715,7 +1715,7 @@ impl Clean<Type> for hir::Ty {
}
TySlice(ref ty) => Vector(box ty.clean(cx)),
TyArray(ref ty, length) => {
use rustc_const_eval::eval_length;
use rustc::middle::const_val::eval_length;
let n = eval_length(cx.tcx, length, "array length").unwrap();
FixedVector(box ty.clean(cx), n.to_string())
},

View file

@ -33,7 +33,6 @@ extern crate getopts;
extern crate env_logger;
extern crate libc;
extern crate rustc;
extern crate rustc_const_eval;
extern crate rustc_data_structures;
extern crate rustc_trans;
extern crate rustc_driver;