Stop re-exporting check_match::Constructor.

This commit is contained in:
Ms2ger 2016-03-31 14:54:09 +02:00
parent 30a3849f22
commit 8cd9c2b259
2 changed files with 8 additions and 8 deletions

View file

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
pub use self::Constructor::*;
use self::Constructor::*;
use self::Usefulness::*;
use self::WitnessPreference::*;

View file

@ -189,7 +189,7 @@ use self::Opt::*;
use self::FailureHandler::*;
use llvm::{ValueRef, BasicBlockRef};
use rustc_const_eval::check_match::{self, StaticInliner};
use rustc_const_eval::check_match::{self, Constructor, StaticInliner};
use rustc_const_eval::{compare_lit_exprs, eval_const_expr};
use middle::def::{Def, DefMap};
use middle::def_id::DefId;
@ -609,19 +609,19 @@ fn enter_opt<'a, 'p, 'blk, 'tcx>(
let _indenter = indenter();
let ctor = match opt {
&ConstantValue(ConstantExpr(expr), _) => check_match::ConstantValue(
&ConstantValue(ConstantExpr(expr), _) => Constructor::ConstantValue(
eval_const_expr(bcx.tcx(), &expr)
),
&ConstantRange(ConstantExpr(lo), ConstantExpr(hi), _) => check_match::ConstantRange(
&ConstantRange(ConstantExpr(lo), ConstantExpr(hi), _) => Constructor::ConstantRange(
eval_const_expr(bcx.tcx(), &lo),
eval_const_expr(bcx.tcx(), &hi)
),
&SliceLengthEqual(n, _) =>
check_match::Slice(n),
Constructor::Slice(n),
&SliceLengthGreaterOrEqual(before, after, _) =>
check_match::SliceWithSubslice(before, after),
Constructor::SliceWithSubslice(before, after),
&Variant(_, _, def_id, _) =>
check_match::Constructor::Variant(def_id)
Constructor::Variant(def_id)
};
let param_env = bcx.tcx().empty_parameter_environment();
@ -1229,7 +1229,7 @@ fn compile_submatch_continue<'a, 'p, 'blk, 'tcx>(mut bcx: Block<'blk, 'tcx>,
Some(field_vals) => {
let pats = enter_match(bcx, dm, m, col, val, |pats|
check_match::specialize(&mcx, pats,
&check_match::Single, col,
&Constructor::Single, col,
field_vals.len())
);
let mut vals: Vec<_> = field_vals.into_iter()