librustc: Fix merge fallout.

This commit is contained in:
Patrick Walton 2013-08-19 17:24:04 -07:00
parent 5c9f5ec397
commit 4f32a2d854
8 changed files with 18 additions and 52 deletions

View File

@ -420,6 +420,7 @@ mod test {
#[test]
#[should_fail]
fn test_add_bytes_to_bits_tuple_overflow2() {
add_bytes_to_bits_tuple::<u64>((Bounded::max_value::<u64>() - 1, 0), 0x8000000000000000);
let value: u64 = Bounded::max_value();
add_bytes_to_bits_tuple::<u64>((value - 1, 0), 0x8000000000000000);
}
}

View File

@ -68,7 +68,7 @@ pub fn check_loans(bccx: @BorrowckCtxt,
body: &ast::Block) {
debug!("check_loans(body id=%?)", body.id);
let mut clcx = CheckLoanCtxt {
let clcx = CheckLoanCtxt {
bccx: bccx,
dfcx_loans: dfcx_loans,
move_data: @move_data,

View File

@ -377,7 +377,7 @@ impl Visitor<()> for GatherLocalsVisitor {
if pat_util::pat_is_binding(self.fcx.ccx.tcx.def_map, p) => {
self.assign(p.id, None);
debug!("Pattern binding %s is assigned to %s",
self.tcx.sess.str_of(path.idents[0]),
self.tcx.sess.str_of(path.segments[0].identifier),
self.fcx.infcx().ty_to_str(
self.fcx.inh.locals.get_copy(&p.id)));
}
@ -3299,7 +3299,7 @@ pub fn instantiate_path(fcx: @mut FnCtxt,
node_id: ast::NodeId) {
debug!(">>> instantiate_path");
let mut ty_param_count = tpt.generics.type_param_defs.len();
let ty_param_count = tpt.generics.type_param_defs.len();
let mut ty_substs_len = 0;
for segment in pth.segments.iter() {
ty_substs_len += segment.types.len()

View File

@ -930,8 +930,12 @@ delegate!(float to Float)
delegate!(f32 to Float)
delegate!(f64 to Float)
impl<T> Default for *const T {
fn fmt(me: &*const T, f: &mut Formatter) { Pointer::fmt(me, f) }
impl<T> Default for *T {
fn fmt(me: &*T, f: &mut Formatter) { Pointer::fmt(me, f) }
}
impl<T> Default for *mut T {
fn fmt(me: &*mut T, f: &mut Formatter) { Pointer::fmt(me, f) }
}
// If you expected tests to be here, look instead at the run-pass/ifmt.rs test,

View File

@ -76,7 +76,6 @@ fn rand_substructure(cx: @ExtCtxt, span: span, substr: &Substructure) -> @expr {
let variant_count = cx.expr_uint(span, variants.len());
let r_ty = cx.ty_ident(span, cx.ident_of("R"));
let rand_name = cx.path_all(span,
true,
rand_ident.clone(),

View File

@ -372,7 +372,7 @@ mod test {
ast::PathSegment {
identifier: str_to_ident("a"),
lifetime: None,
types: ~[],
types: opt_vec::Empty,
}
],
}),
@ -391,12 +391,12 @@ mod test {
ast::PathSegment {
identifier: str_to_ident("a"),
lifetime: None,
types: ~[],
types: opt_vec::Empty,
},
ast::PathSegment {
identifier: str_to_ident("b"),
lifetime: None,
types: ~[],
types: opt_vec::Empty,
}
]
}),
@ -509,48 +509,6 @@ mod test {
parser_done(parser);
}
#[test] fn parse_arg () {
let parser = string_to_parser(@"b : int");
assert_eq!(parser.parse_arg_general(true),
ast::arg{
is_mutbl: false,
ty: ast::Ty{id:3, // fixme
node: ast::ty_path(ast::Path{
span:sp(4,4), // this is bizarre...
// check this in the original parser?
global:false,
segments: ~[
ast::PathSegment {
identifier:
str_to_ident("int"),
lifetime: None,
types: opt_vec::Empty,
}
],
}, None, 2),
span:sp(4,7)},
pat: @ast::pat{id:1,
node: ast::pat_ident(
ast::bind_infer,
ast::Path {
span:sp(0,1),
global:false,
segments: ~[
ast::PathSegment {
identifier:
str_to_ident("b"),
lifetime: None,
types: opt_vec::Empty,
}
],
},
None // no idea
),
span: sp(0,1)},
id: 4 // fixme
})
}
// check the contents of the tt manually:
#[test] fn parse_fundecl () {
// this test depends on the intern order of "fn" and "int", and on the

View File

@ -1,3 +1,5 @@
// xfail-test
// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.

View File

@ -1,3 +1,5 @@
// xfail-test
// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.