Skip to content

Commit eafafd7

Browse files
committed
---
yaml --- r: 41957 b: refs/heads/master c: e8f4da7 h: refs/heads/master i: 41955: 6bd356e v: v3
1 parent 8f8bb90 commit eafafd7

File tree

6 files changed

+25
-23
lines changed

6 files changed

+25
-23
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 4b2aa286d8448168e9077565ff17b7a6df4db105
2+
refs/heads/master: e8f4da78e78238d7a24dc452302a4c1f113f0e2a
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 2f46b763da2c098913884f101b6d71d69af41b49
55
refs/heads/try: 3d5418789064fdb463e872a4e651af1c628a3650

trunk/doc/rust.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ let log loop
222222
match mod move mut
223223
priv pub pure
224224
ref return
225-
self static struct super
225+
self static struct
226226
true trait type
227227
unsafe use
228228
while

trunk/doc/tutorial-ffi.md

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,14 @@ fn as_hex(data: ~[u8]) -> ~str {
2626
return acc;
2727
}
2828
29-
fn sha1(data: ~str) -> ~str unsafe {
30-
let bytes = str::to_bytes(data);
31-
let hash = crypto::SHA1(vec::raw::to_ptr(bytes),
32-
vec::len(bytes) as c_uint, ptr::null());
33-
return as_hex(vec::from_buf(hash, 20));
29+
fn sha1(data: ~str) -> ~str {
30+
unsafe {
31+
let bytes = str::to_bytes(data);
32+
let hash = crypto::SHA1(vec::raw::to_ptr(bytes),
33+
vec::len(bytes) as c_uint,
34+
ptr::null());
35+
return as_hex(vec::from_buf(hash, 20));
36+
}
3437
}
3538
3639
fn main() {
@@ -225,13 +228,15 @@ struct timeval {
225228
extern mod lib_c {
226229
fn gettimeofday(tv: *timeval, tz: *()) -> i32;
227230
}
228-
fn unix_time_in_microseconds() -> u64 unsafe {
229-
let x = timeval {
230-
mut tv_sec: 0 as c_ulonglong,
231-
mut tv_usec: 0 as c_ulonglong
232-
};
233-
lib_c::gettimeofday(ptr::addr_of(&x), ptr::null());
234-
return (x.tv_sec as u64) * 1000_000_u64 + (x.tv_usec as u64);
231+
fn unix_time_in_microseconds() -> u64 {
232+
unsafe {
233+
let x = timeval {
234+
mut tv_sec: 0 as c_ulonglong,
235+
mut tv_usec: 0 as c_ulonglong
236+
};
237+
lib_c::gettimeofday(ptr::addr_of(&x), ptr::null());
238+
return (x.tv_sec as u64) * 1000_000_u64 + (x.tv_usec as u64);
239+
}
235240
}
236241
237242
# fn main() { assert fmt!("%?", unix_time_in_microseconds()) != ~""; }

trunk/src/librustc/middle/ty.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1659,13 +1659,13 @@ fn subst(cx: ctxt,
16591659
}
16601660
}
16611661
1662-
// Performs substitutions on a set of substitutions (result = sup(sub)) to
1662+
// Performs substitutions on a set of substitutions (result = super(sub)) to
16631663
// yield a new set of substitutions. This is used in trait inheritance.
1664-
fn subst_substs(cx: ctxt, sup: &substs, sub: &substs) -> substs {
1664+
fn subst_substs(cx: ctxt, super: &substs, sub: &substs) -> substs {
16651665
{
1666-
self_r: sup.self_r,
1667-
self_ty: sup.self_ty.map(|typ| subst(cx, sub, *typ)),
1668-
tps: sup.tps.map(|typ| subst(cx, sub, *typ))
1666+
self_r: super.self_r,
1667+
self_ty: super.self_ty.map(|typ| subst(cx, sub, *typ)),
1668+
tps: super.tps.map(|typ| subst(cx, sub, *typ))
16691669
}
16701670
}
16711671

trunk/src/libsyntax/parse/token.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,7 @@ fn strict_keyword_table() -> HashMap<~str, ()> {
493493
~"once",
494494
~"priv", ~"pub", ~"pure",
495495
~"ref", ~"return",
496-
~"struct", ~"super",
496+
~"struct",
497497
~"true", ~"trait", ~"type",
498498
~"unsafe", ~"use",
499499
~"while"

trunk/src/test/compile-fail/keyword-super.rs

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)