From fe0de07b28e2e9c1adcb126eea15ff4de14efb5b Mon Sep 17 00:00:00 2001 From: llogiq Date: Sun, 16 Aug 2015 16:05:51 +0200 Subject: [PATCH] dogfooded --- src/consts.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/consts.rs b/src/consts.rs index fd6479df2..b636fe1e2 100644 --- a/src/consts.rs +++ b/src/consts.rs @@ -3,7 +3,6 @@ use rustc::middle::const_eval::lookup_const_by_id; use rustc::middle::def::PathResolution; use rustc::middle::def::Def::*; use syntax::ast::*; -use syntax::parse::token::InternedString; use syntax::ptr::P; use std::rc::Rc; use std::ops::Deref; @@ -71,11 +70,11 @@ pub enum ConstantVariant { /// true or false ConstantBool(bool), /// an array of constants - ConstantVec(Box>), + ConstantVec(Vec), /// also an array, but with only one constant, repeated N times ConstantRepeat(Box, usize), /// a tuple of constants - ConstantTuple(Box>), + ConstantTuple(Vec), } impl ConstantVariant { @@ -159,7 +158,7 @@ fn constant_vec + Sized>(cx: &Context, vec: &[E]) -> Optio } } Some(Constant { - constant: ConstantVec(Box::new(parts)), + constant: ConstantVec(parts), needed_resolution: resolved }) } @@ -177,7 +176,7 @@ fn constant_tup + Sized>(cx: &Context, tup: &[E]) -> Optio } } Some(Constant { - constant: ConstantTuple(Box::new(parts)), + constant: ConstantTuple(parts), needed_resolution: resolved }) }