Rebase fixes.
I've totally mangled the history with these rebases; sorry, future programmer!
This commit is contained in:
parent
4f7e5ed660
commit
d442f77561
7 changed files with 16 additions and 17 deletions
|
|
@ -1598,7 +1598,7 @@ impl LintPass for MissingCopyImplementations {
|
|||
}
|
||||
ty::mk_struct(cx.tcx,
|
||||
ast_util::local_def(item.id),
|
||||
Substs::empty())
|
||||
cx.tcx.mk_substs(Substs::empty()))
|
||||
}
|
||||
ast::ItemEnum(_, ref ast_generics) => {
|
||||
if ast_generics.is_parameterized() {
|
||||
|
|
@ -1606,7 +1606,7 @@ impl LintPass for MissingCopyImplementations {
|
|||
}
|
||||
ty::mk_enum(cx.tcx,
|
||||
ast_util::local_def(item.id),
|
||||
Substs::empty())
|
||||
cx.tcx.mk_substs(Substs::empty()))
|
||||
}
|
||||
_ => return,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -803,14 +803,13 @@ bitflags! {
|
|||
}
|
||||
}
|
||||
|
||||
impl Copy for TypeFlags {}
|
||||
|
||||
macro_rules! sty_debug_print {
|
||||
($ctxt: expr, $($variant: ident),*) => {{
|
||||
// curious inner module to allow variant names to be used as
|
||||
// variable names.
|
||||
mod inner {
|
||||
use middle::ty;
|
||||
#[deriving(Copy)]
|
||||
struct DebugStat {
|
||||
total: uint,
|
||||
region_infer: uint,
|
||||
|
|
@ -5704,7 +5703,7 @@ pub fn object_region_bounds<'tcx>(tcx: &ctxt<'tcx>,
|
|||
|
||||
let opt_trait_ref = opt_principal.map_or(Vec::new(), |principal| {
|
||||
let substs = principal.substs().with_self_ty(open_ty);
|
||||
vec!(Rc::new(ty::Binder(ty::TraitRef::new(principal.def_id(), substs))))
|
||||
vec!(Rc::new(ty::Binder(ty::TraitRef::new(principal.def_id(), tcx.mk_substs(substs)))))
|
||||
});
|
||||
|
||||
let param_bounds = ty::ParamBounds {
|
||||
|
|
@ -6063,7 +6062,7 @@ pub fn hash_crate_independent<'tcx>(tcx: &ctxt<'tcx>, ty: Ty<'tcx>, svh: &Svh) -
|
|||
}
|
||||
ty_rptr(r, m) => {
|
||||
byte!(13);
|
||||
region(state, r);
|
||||
region(state, *r);
|
||||
mt(state, m);
|
||||
}
|
||||
ty_bare_fn(opt_def_id, ref b) => {
|
||||
|
|
@ -6123,7 +6122,7 @@ pub fn hash_crate_independent<'tcx>(tcx: &ctxt<'tcx>, ty: Ty<'tcx>, svh: &Svh) -
|
|||
ty_unboxed_closure(d, r, _) => {
|
||||
byte!(24);
|
||||
did(state, d);
|
||||
region(state, r);
|
||||
region(state, *r);
|
||||
}
|
||||
}
|
||||
true
|
||||
|
|
@ -6695,7 +6694,7 @@ pub fn can_type_implement_copy<'tcx>(tcx: &ctxt<'tcx>,
|
|||
param_env: &ParameterEnvironment<'tcx>)
|
||||
-> Result<(),CopyImplementationError> {
|
||||
match self_type.sty {
|
||||
ty::ty_struct(struct_did, ref substs) => {
|
||||
ty::ty_struct(struct_did, substs) => {
|
||||
let fields = ty::struct_fields(tcx, struct_did, substs);
|
||||
for field in fields.iter() {
|
||||
if type_moves_by_default(tcx, field.mt.ty, param_env) {
|
||||
|
|
@ -6703,7 +6702,7 @@ pub fn can_type_implement_copy<'tcx>(tcx: &ctxt<'tcx>,
|
|||
}
|
||||
}
|
||||
}
|
||||
ty::ty_enum(enum_did, ref substs) => {
|
||||
ty::ty_enum(enum_did, substs) => {
|
||||
let enum_variants = ty::enum_variants(tcx, enum_did);
|
||||
for variant in enum_variants.iter() {
|
||||
for variant_arg_type in variant.args.iter() {
|
||||
|
|
|
|||
|
|
@ -759,7 +759,7 @@ impl<'tcx> Repr<'tcx> for ty::TraitRef<'tcx> {
|
|||
let trait_def = ty::lookup_trait_def(tcx, self.def_id);
|
||||
format!("TraitRef({}, {})",
|
||||
self.substs.self_ty().repr(tcx),
|
||||
parameterized(tcx, base.as_slice(), &self.substs, &trait_def.generics, self.def_id))
|
||||
parameterized(tcx, base.as_slice(), self.substs, &trait_def.generics, self.def_id))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ pub fn compile_input(sess: Session,
|
|||
phase_save_analysis(&analysis.ty_cx.sess, analysis.ty_cx.map.krate(), &analysis, outdir);
|
||||
|
||||
if log_enabled!(::log::INFO) {
|
||||
println!("Pre-trans")
|
||||
println!("Pre-trans");
|
||||
analysis.ty_cx.print_debug_stats();
|
||||
}
|
||||
|
||||
|
|
@ -91,7 +91,7 @@ pub fn compile_input(sess: Session,
|
|||
let (tcx, trans) = phase_4_translate_to_llvm(analysis);
|
||||
|
||||
if log_enabled!(::log::INFO) {
|
||||
println!("Post-trans")
|
||||
println!("Post-trans");
|
||||
tcx.print_debug_stats();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -350,7 +350,7 @@ fn apply_adjustments<'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
|
|||
expr.id,
|
||||
datum_ty,
|
||||
|t| ty::mk_rptr(tcx,
|
||||
ty::ReStatic,
|
||||
tcx.mk_region(ty::ReStatic),
|
||||
ty::mt{
|
||||
ty: t,
|
||||
mutbl: ast::MutImmutable
|
||||
|
|
|
|||
|
|
@ -1419,7 +1419,7 @@ pub fn trait_def_of_item<'a, 'tcx>(ccx: &CrateCtxt<'a, 'tcx>,
|
|||
index += 1;
|
||||
Some(ty::mk_param(ccx.tcx,
|
||||
subst::AssocSpace,
|
||||
index as u32 - 1,
|
||||
index - 1,
|
||||
local_def(trait_item.ty_param.id))).into_iter()
|
||||
}
|
||||
ast::RequiredMethod(_) | ast::ProvidedMethod(_) => {
|
||||
|
|
|
|||
|
|
@ -3746,9 +3746,9 @@ impl<'a> Parser<'a> {
|
|||
if id.name == token::special_idents::invalid.name {
|
||||
P(spanned(lo,
|
||||
hi,
|
||||
StmtMac(spanned(lo,
|
||||
StmtMac(P(spanned(lo,
|
||||
hi,
|
||||
MacInvocTT(pth, tts, EMPTY_CTXT)),
|
||||
MacInvocTT(pth, tts, EMPTY_CTXT))),
|
||||
style)))
|
||||
} else {
|
||||
// if it has a special ident, it's definitely an item
|
||||
|
|
@ -3911,7 +3911,7 @@ impl<'a> Parser<'a> {
|
|||
_ => {
|
||||
let e = self.mk_mac_expr(span.lo,
|
||||
span.hi,
|
||||
macro.node);
|
||||
macro.and_then(|m| m.node));
|
||||
let e =
|
||||
self.parse_dot_or_call_expr_with(e);
|
||||
self.handle_expression_like_statement(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue