Skip to content

Commit d442f77

Browse files
committed
Rebase fixes.
I've totally mangled the history with these rebases; sorry, future programmer!
1 parent 4f7e5ed commit d442f77

File tree

7 files changed

+16
-17
lines changed

7 files changed

+16
-17
lines changed

src/librustc/lint/builtin.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1598,15 +1598,15 @@ impl LintPass for MissingCopyImplementations {
15981598
}
15991599
ty::mk_struct(cx.tcx,
16001600
ast_util::local_def(item.id),
1601-
Substs::empty())
1601+
cx.tcx.mk_substs(Substs::empty()))
16021602
}
16031603
ast::ItemEnum(_, ref ast_generics) => {
16041604
if ast_generics.is_parameterized() {
16051605
return
16061606
}
16071607
ty::mk_enum(cx.tcx,
16081608
ast_util::local_def(item.id),
1609-
Substs::empty())
1609+
cx.tcx.mk_substs(Substs::empty()))
16101610
}
16111611
_ => return,
16121612
};

src/librustc/middle/ty.rs

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -803,14 +803,13 @@ bitflags! {
803803
}
804804
}
805805

806-
impl Copy for TypeFlags {}
807-
808806
macro_rules! sty_debug_print {
809807
($ctxt: expr, $($variant: ident),*) => {{
810808
// curious inner module to allow variant names to be used as
811809
// variable names.
812810
mod inner {
813811
use middle::ty;
812+
#[deriving(Copy)]
814813
struct DebugStat {
815814
total: uint,
816815
region_infer: uint,
@@ -5704,7 +5703,7 @@ pub fn object_region_bounds<'tcx>(tcx: &ctxt<'tcx>,
57045703

57055704
let opt_trait_ref = opt_principal.map_or(Vec::new(), |principal| {
57065705
let substs = principal.substs().with_self_ty(open_ty);
5707-
vec!(Rc::new(ty::Binder(ty::TraitRef::new(principal.def_id(), substs))))
5706+
vec!(Rc::new(ty::Binder(ty::TraitRef::new(principal.def_id(), tcx.mk_substs(substs)))))
57085707
});
57095708

57105709
let param_bounds = ty::ParamBounds {
@@ -6063,7 +6062,7 @@ pub fn hash_crate_independent<'tcx>(tcx: &ctxt<'tcx>, ty: Ty<'tcx>, svh: &Svh) -
60636062
}
60646063
ty_rptr(r, m) => {
60656064
byte!(13);
6066-
region(state, r);
6065+
region(state, *r);
60676066
mt(state, m);
60686067
}
60696068
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) -
61236122
ty_unboxed_closure(d, r, _) => {
61246123
byte!(24);
61256124
did(state, d);
6126-
region(state, r);
6125+
region(state, *r);
61276126
}
61286127
}
61296128
true
@@ -6695,15 +6694,15 @@ pub fn can_type_implement_copy<'tcx>(tcx: &ctxt<'tcx>,
66956694
param_env: &ParameterEnvironment<'tcx>)
66966695
-> Result<(),CopyImplementationError> {
66976696
match self_type.sty {
6698-
ty::ty_struct(struct_did, ref substs) => {
6697+
ty::ty_struct(struct_did, substs) => {
66996698
let fields = ty::struct_fields(tcx, struct_did, substs);
67006699
for field in fields.iter() {
67016700
if type_moves_by_default(tcx, field.mt.ty, param_env) {
67026701
return Err(FieldDoesNotImplementCopy(field.name))
67036702
}
67046703
}
67056704
}
6706-
ty::ty_enum(enum_did, ref substs) => {
6705+
ty::ty_enum(enum_did, substs) => {
67076706
let enum_variants = ty::enum_variants(tcx, enum_did);
67086707
for variant in enum_variants.iter() {
67096708
for variant_arg_type in variant.args.iter() {

src/librustc/util/ppaux.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -759,7 +759,7 @@ impl<'tcx> Repr<'tcx> for ty::TraitRef<'tcx> {
759759
let trait_def = ty::lookup_trait_def(tcx, self.def_id);
760760
format!("TraitRef({}, {})",
761761
self.substs.self_ty().repr(tcx),
762-
parameterized(tcx, base.as_slice(), &self.substs, &trait_def.generics, self.def_id))
762+
parameterized(tcx, base.as_slice(), self.substs, &trait_def.generics, self.def_id))
763763
}
764764
}
765765

src/librustc_driver/driver.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,15 +83,15 @@ pub fn compile_input(sess: Session,
8383
phase_save_analysis(&analysis.ty_cx.sess, analysis.ty_cx.map.krate(), &analysis, outdir);
8484

8585
if log_enabled!(::log::INFO) {
86-
println!("Pre-trans")
86+
println!("Pre-trans");
8787
analysis.ty_cx.print_debug_stats();
8888
}
8989

9090
if stop_after_phase_3(&analysis.ty_cx.sess) { return; }
9191
let (tcx, trans) = phase_4_translate_to_llvm(analysis);
9292

9393
if log_enabled!(::log::INFO) {
94-
println!("Post-trans")
94+
println!("Post-trans");
9595
tcx.print_debug_stats();
9696
}
9797

src/librustc_trans/trans/expr.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ fn apply_adjustments<'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
350350
expr.id,
351351
datum_ty,
352352
|t| ty::mk_rptr(tcx,
353-
ty::ReStatic,
353+
tcx.mk_region(ty::ReStatic),
354354
ty::mt{
355355
ty: t,
356356
mutbl: ast::MutImmutable

src/librustc_typeck/collect.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1419,7 +1419,7 @@ pub fn trait_def_of_item<'a, 'tcx>(ccx: &CrateCtxt<'a, 'tcx>,
14191419
index += 1;
14201420
Some(ty::mk_param(ccx.tcx,
14211421
subst::AssocSpace,
1422-
index as u32 - 1,
1422+
index - 1,
14231423
local_def(trait_item.ty_param.id))).into_iter()
14241424
}
14251425
ast::RequiredMethod(_) | ast::ProvidedMethod(_) => {

src/libsyntax/parse/parser.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3746,9 +3746,9 @@ impl<'a> Parser<'a> {
37463746
if id.name == token::special_idents::invalid.name {
37473747
P(spanned(lo,
37483748
hi,
3749-
StmtMac(spanned(lo,
3749+
StmtMac(P(spanned(lo,
37503750
hi,
3751-
MacInvocTT(pth, tts, EMPTY_CTXT)),
3751+
MacInvocTT(pth, tts, EMPTY_CTXT))),
37523752
style)))
37533753
} else {
37543754
// if it has a special ident, it's definitely an item
@@ -3911,7 +3911,7 @@ impl<'a> Parser<'a> {
39113911
_ => {
39123912
let e = self.mk_mac_expr(span.lo,
39133913
span.hi,
3914-
macro.node);
3914+
macro.and_then(|m| m.node));
39153915
let e =
39163916
self.parse_dot_or_call_expr_with(e);
39173917
self.handle_expression_like_statement(

0 commit comments

Comments
 (0)