Skip to content

Commit dbd8315

Browse files
committed
Test fixes from rollup
Closes rust-lang#14210 (Make Vec.truncate() resilient against failure in Drop) Closes rust-lang#14206 (Register new snapshots) Closes rust-lang#14205 (use sched_yield on linux and freebsd) Closes rust-lang#14204 (Add a crate for missing stubs from libcore) Closes rust-lang#14201 (Render not_found with an absolute path to the rust stylesheet) Closes rust-lang#14198 (update valgrind headers) Closes rust-lang#14174 (Optimize common path of Once::doit) Closes rust-lang#14162 (Print 'rustc' and 'rustdoc' as the command name for --version) Closes rust-lang#14145 (Better strict version hash (SVH) computation)
1 parent e593c86 commit dbd8315

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

src/librlibc/lib.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,16 +45,17 @@ extern "rust-intrinsic" {
4545
}
4646

4747
#[no_mangle]
48-
pub unsafe extern "C" fn memcpy(dest: *mut u8, src: *u8, n: uint) {
48+
pub unsafe extern "C" fn memcpy(dest: *mut u8, src: *u8, n: uint) -> *mut u8 {
4949
let mut i = 0;
5050
while i < n {
5151
*(offset(dest as *u8, i as int) as *mut u8) = *offset(src, i as int);
5252
i += 1;
5353
}
54+
return dest;
5455
}
5556

5657
#[no_mangle]
57-
pub unsafe extern "C" fn memmove(dest: *mut u8, src: *u8, n: uint) {
58+
pub unsafe extern "C" fn memmove(dest: *mut u8, src: *u8, n: uint) -> *mut u8 {
5859
if src < dest as *u8 { // copy from end
5960
let mut i = n;
6061
while i != 0 {
@@ -68,15 +69,17 @@ pub unsafe extern "C" fn memmove(dest: *mut u8, src: *u8, n: uint) {
6869
i += 1;
6970
}
7071
}
72+
return dest;
7173
}
7274

7375
#[no_mangle]
74-
pub unsafe extern "C" fn memset(s: *mut u8, c: i32, n: uint) {
76+
pub unsafe extern "C" fn memset(s: *mut u8, c: i32, n: uint) -> *mut u8 {
7577
let mut i = 0;
7678
while i < n {
7779
*(offset(s as *u8, i as int) as *mut u8) = c as u8;
7880
i += 1;
7981
}
82+
return s;
8083
}
8184

8285
#[no_mangle]

src/librustc/back/svh.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -352,11 +352,11 @@ mod svh_visitor {
352352
}
353353

354354
fn visit_struct_def(&mut self, s: &StructDef, ident: Ident,
355-
g: &Generics, n: NodeId, e: E) {
355+
g: &Generics, _n: NodeId, e: E) {
356356
SawStructDef(content(ident)).hash(self.st);
357357
// For some reason walk_struct_def does not call walk_generics.
358358
visit::walk_generics(self, g, e.clone());
359-
visit::walk_struct_def(self, s, ident, g, n, e)
359+
visit::walk_struct_def(self, s, e)
360360
}
361361

362362
fn visit_variant(&mut self, v: &Variant, g: &Generics, e: E) {
@@ -461,8 +461,9 @@ mod svh_visitor {
461461
SawGenerics.hash(self.st); visit::walk_generics(self, g, e)
462462
}
463463

464-
fn visit_fn(&mut self, fk: &FnKind, fd: &FnDecl, b: &Block, s: Span, n: NodeId, e: E) {
465-
SawFn.hash(self.st); visit::walk_fn(self, fk, fd, b, s, n, e)
464+
fn visit_fn(&mut self, fk: &FnKind, fd: &FnDecl, b: &Block, s: Span,
465+
_n: NodeId, e: E) {
466+
SawFn.hash(self.st); visit::walk_fn(self, fk, fd, b, s, e)
466467
}
467468

468469
fn visit_ty_method(&mut self, t: &TypeMethod, e: E) {

0 commit comments

Comments
 (0)