Skip to content

Commit 78d5f4b

Browse files
committed
---
yaml --- r: 27891 b: refs/heads/try c: 9ea6b3a h: refs/heads/master i: 27889: 492e214 27887: b872216 v: v3
1 parent b5084d2 commit 78d5f4b

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
@@ -2,7 +2,7 @@
22
refs/heads/master: cd6f24f9d14ac90d167386a56e7a6ac1f0318195
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: cd6f24f9d14ac90d167386a56e7a6ac1f0318195
5-
refs/heads/try: 69daeffddb534c4415967f18f795bc5b6dc262d2
5+
refs/heads/try: 9ea6b3a32e808c4cf1e2d45cc26363e700944ef9
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: d0c6ce338884ee21843f4b40bf6bf18d222ce5df

branches/try/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/try/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/try/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/try/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)