Skip to content

Stop re-exporting check_match::Constructor. #32646

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 15, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/librustc_const_eval/check_match.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::*;

Expand Down
14 changes: 7 additions & 7 deletions src/librustc_trans/_match.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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()
Expand Down