Skip to content

Commit 1ebb593

Browse files
committed
librustc: Fix merge fallout.
1 parent a78bb55 commit 1ebb593

File tree

8 files changed

+18
-52
lines changed

8 files changed

+18
-52
lines changed

src/libextra/crypto/cryptoutil.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,6 +420,7 @@ mod test {
420420
#[test]
421421
#[should_fail]
422422
fn test_add_bytes_to_bits_tuple_overflow2() {
423-
add_bytes_to_bits_tuple::<u64>((Bounded::max_value::<u64>() - 1, 0), 0x8000000000000000);
423+
let value: u64 = Bounded::max_value();
424+
add_bytes_to_bits_tuple::<u64>((value - 1, 0), 0x8000000000000000);
424425
}
425426
}

src/librustc/middle/borrowck/check_loans.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ pub fn check_loans(bccx: @BorrowckCtxt,
6868
body: &ast::Block) {
6969
debug!("check_loans(body id=%?)", body.id);
7070

71-
let mut clcx = CheckLoanCtxt {
71+
let clcx = CheckLoanCtxt {
7272
bccx: bccx,
7373
dfcx_loans: dfcx_loans,
7474
move_data: @move_data,

src/librustc/middle/typeck/check/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ impl Visitor<()> for GatherLocalsVisitor {
377377
if pat_util::pat_is_binding(self.fcx.ccx.tcx.def_map, p) => {
378378
self.assign(p.id, None);
379379
debug!("Pattern binding %s is assigned to %s",
380-
self.tcx.sess.str_of(path.idents[0]),
380+
self.tcx.sess.str_of(path.segments[0].identifier),
381381
self.fcx.infcx().ty_to_str(
382382
self.fcx.inh.locals.get_copy(&p.id)));
383383
}
@@ -3316,7 +3316,7 @@ pub fn instantiate_path(fcx: @mut FnCtxt,
33163316
node_id: ast::NodeId) {
33173317
debug!(">>> instantiate_path");
33183318

3319-
let mut ty_param_count = tpt.generics.type_param_defs.len();
3319+
let ty_param_count = tpt.generics.type_param_defs.len();
33203320
let mut ty_substs_len = 0;
33213321
for segment in pth.segments.iter() {
33223322
ty_substs_len += segment.types.len()

src/libstd/fmt/mod.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -908,8 +908,12 @@ delegate!(float to Float)
908908
delegate!(f32 to Float)
909909
delegate!(f64 to Float)
910910

911-
impl<T> Default for *const T {
912-
fn fmt(me: &*const T, f: &mut Formatter) { Pointer::fmt(me, f) }
911+
impl<T> Default for *T {
912+
fn fmt(me: &*T, f: &mut Formatter) { Pointer::fmt(me, f) }
913+
}
914+
915+
impl<T> Default for *mut T {
916+
fn fmt(me: &*mut T, f: &mut Formatter) { Pointer::fmt(me, f) }
913917
}
914918

915919
// If you expected tests to be here, look instead at the run-pass/ifmt.rs test,

src/libsyntax/ext/deriving/rand.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ fn rand_substructure(cx: @ExtCtxt, span: span, substr: &Substructure) -> @expr {
7676

7777
let variant_count = cx.expr_uint(span, variants.len());
7878

79-
let r_ty = cx.ty_ident(span, cx.ident_of("R"));
8079
let rand_name = cx.path_all(span,
8180
true,
8281
rand_ident.clone(),

src/libsyntax/parse/mod.rs

Lines changed: 3 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ mod test {
372372
ast::PathSegment {
373373
identifier: str_to_ident("a"),
374374
lifetime: None,
375-
types: ~[],
375+
types: opt_vec::Empty,
376376
}
377377
],
378378
}),
@@ -391,12 +391,12 @@ mod test {
391391
ast::PathSegment {
392392
identifier: str_to_ident("a"),
393393
lifetime: None,
394-
types: ~[],
394+
types: opt_vec::Empty,
395395
},
396396
ast::PathSegment {
397397
identifier: str_to_ident("b"),
398398
lifetime: None,
399-
types: ~[],
399+
types: opt_vec::Empty,
400400
}
401401
]
402402
}),
@@ -509,48 +509,6 @@ mod test {
509509
parser_done(parser);
510510
}
511511
512-
#[test] fn parse_arg () {
513-
let parser = string_to_parser(@"b : int");
514-
assert_eq!(parser.parse_arg_general(true),
515-
ast::arg{
516-
is_mutbl: false,
517-
ty: ast::Ty{id:3, // fixme
518-
node: ast::ty_path(ast::Path{
519-
span:sp(4,4), // this is bizarre...
520-
// check this in the original parser?
521-
global:false,
522-
segments: ~[
523-
ast::PathSegment {
524-
identifier:
525-
str_to_ident("int"),
526-
lifetime: None,
527-
types: opt_vec::Empty,
528-
}
529-
],
530-
}, None, 2),
531-
span:sp(4,7)},
532-
pat: @ast::pat{id:1,
533-
node: ast::pat_ident(
534-
ast::bind_infer,
535-
ast::Path {
536-
span:sp(0,1),
537-
global:false,
538-
segments: ~[
539-
ast::PathSegment {
540-
identifier:
541-
str_to_ident("b"),
542-
lifetime: None,
543-
types: opt_vec::Empty,
544-
}
545-
],
546-
},
547-
None // no idea
548-
),
549-
span: sp(0,1)},
550-
id: 4 // fixme
551-
})
552-
}
553-
554512
// check the contents of the tt manually:
555513
#[test] fn parse_fundecl () {
556514
// this test depends on the intern order of "fn" and "int", and on the

src/test/debug-info/generic-trait-generic-static-default-method.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// xfail-test
2+
13
// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
24
// file at the top-level directory of this distribution and at
35
// http://rust-lang.org/COPYRIGHT.

src/test/debug-info/trait-generic-static-default-method.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// xfail-test
2+
13
// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
24
// file at the top-level directory of this distribution and at
35
// http://rust-lang.org/COPYRIGHT.

0 commit comments

Comments
 (0)