Rollup merge of #32646 - Ms2ger:Constructor, r=sanxiyn

Stop re-exporting check_match::Constructor.
This commit is contained in:
Steve Klabnik 2016-04-14 14:49:09 -04:00
commit 04b7427bb1
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 rustc::hir::def::{Def, DefMap};
use rustc::hir::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()