Skip to content

Commit 4267c30

Browse files
committed
---
yaml --- r: 21205 b: refs/heads/snap-stage3 c: 9ea6b3a h: refs/heads/master i: 21203: 74ed1ee v: v3
1 parent 2d95ae1 commit 4267c30

File tree

5 files changed

+8
-7
lines changed

5 files changed

+8
-7
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: e430a699f2c60890d9b86069fd0c68a70ece7120
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 69daeffddb534c4415967f18f795bc5b6dc262d2
4+
refs/heads/snap-stage3: 9ea6b3a32e808c4cf1e2d45cc26363e700944ef9
55
refs/heads/try: ffbe0e0e00374358b789b0037bcb3a577cd218be
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/src/libcore/io.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,7 @@ fn u64_to_be_bytes<T>(n: u64, size: uint, f: fn(v: &[u8]) -> T) -> T {
521521
}
522522
}
523523

524-
fn u64_from_be_bytes(data: ~[u8], start: uint, size: uint) -> u64 {
524+
fn u64_from_be_bytes(data: &[const u8], start: uint, size: uint) -> u64 {
525525
let mut sz = size;
526526
assert (sz <= 8u);
527527
let mut val = 0_u64;

branches/snap-stage3/src/libcore/uint-template.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ impl T: iter::TimesIx {
121121
*
122122
* `buf` must not be empty
123123
*/
124-
fn parse_buf(buf: ~[u8], radix: uint) -> option<T> {
124+
fn parse_buf(buf: &[const u8], radix: uint) -> option<T> {
125125
if vec::len(buf) == 0u { return none; }
126126
let mut i = vec::len(buf) - 1u;
127127
let mut power = 1u as T;

branches/snap-stage3/src/rustc/metadata/decoder.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ fn lookup_hash(d: ebml::doc, eq_fn: fn(x:&[u8]) -> bool, hash: uint) ->
7272
let belt = tag_index_buckets_bucket_elt;
7373
for ebml::tagged_docs(bucket, belt) |elt| {
7474
let pos = io::u64_from_be_bytes(*elt.data, elt.start, 4u) as uint;
75-
if eq_fn(vec::slice(*elt.data, elt.start + 4u, elt.end)) {
75+
if eq_fn(vec::view(*elt.data, elt.start + 4u, elt.end)) {
7676
return some(ebml::doc_at(d.data, pos).doc);
7777
}
7878
};
@@ -81,7 +81,7 @@ fn lookup_hash(d: ebml::doc, eq_fn: fn(x:&[u8]) -> bool, hash: uint) ->
8181

8282
fn maybe_find_item(item_id: int, items: ebml::doc) -> option<ebml::doc> {
8383
fn eq_item(bytes: &[u8], item_id: int) -> bool {
84-
return io::u64_from_be_bytes(vec::slice(bytes, 0u, 4u), 0u, 4u) as int
84+
return io::u64_from_be_bytes(vec::view(bytes, 0u, 4u), 0u, 4u) as int
8585
== item_id;
8686
}
8787
lookup_hash(items,

branches/snap-stage3/src/rustc/metadata/tydecode.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -391,8 +391,9 @@ fn parse_def_id(buf: &[u8]) -> ast::def_id {
391391
error!{"didn't find ':' when parsing def id"};
392392
fail;
393393
}
394-
let crate_part = vec::slice(buf, 0u, colon_idx);
395-
let def_part = vec::slice(buf, colon_idx + 1u, len);
394+
395+
let crate_part = vec::view(buf, 0u, colon_idx);
396+
let def_part = vec::view(buf, colon_idx + 1u, len);
396397

397398
let crate_num = match uint::parse_buf(crate_part, 10u) {
398399
some(cn) => cn as int,

0 commit comments

Comments
 (0)