Skip to content

Commit d50a6df

Browse files
nikomatsakisNick Desaulniers
authored andcommitted
---
yaml --- r: 53127 b: refs/heads/dist-snap c: 91af527 h: refs/heads/master i: 53125: 1e316cf 53123: 3bac7f5 53119: af0bb86 v: v3
1 parent 81ca599 commit d50a6df

38 files changed

+881
-976
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
99
refs/heads/incoming: 44d4d6de762f3f9aae1fedcf454c66b79b3ad58d
10-
refs/heads/dist-snap: 46736868df5d24cd0c4fc8745af86be11e954b05
10+
refs/heads/dist-snap: 91af52784aa1febcd424b9057221298c1f793094
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1313
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/src/compiletest/runtest.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -570,7 +570,8 @@ fn make_run_args(config: config, _props: TestProps, testfile: &Path) ->
570570
};
571571

572572
let args = toolargs + ~[make_exe_name(config, testfile).to_str()];
573-
return ProcArgs {prog: args[0], args: vec::slice(args, 1, args.len())};
573+
return ProcArgs {prog: args[0],
574+
args: vec::slice(args, 1, args.len()).to_vec()};
574575
}
575576

576577
fn split_maybe_args(argstr: Option<~str>) -> ~[~str] {

branches/dist-snap/src/etc/licenseck.py

Lines changed: 5 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@
88
# option. This file may not be copied, modified, or distributed
99
# except according to those terms.
1010

11-
license0 = """\
12-
// Copyright 2012-2013 The Rust Project Developers. See the
11+
license0 = """// Copyright 2012-2013 The Rust Project Developers. See the
1312
// COPYRIGHT file at the top-level directory of this distribution and at
1413
// http://rust-lang.org/COPYRIGHT.
1514
//
@@ -20,8 +19,7 @@
2019
// except according to those terms.
2120
"""
2221

23-
license1 = """\
24-
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
22+
license1 = """// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
2523
// file at the top-level directory of this distribution and at
2624
// http://rust-lang.org/COPYRIGHT.
2725
//
@@ -32,8 +30,7 @@
3230
// except according to those terms.
3331
"""
3432

35-
license2 = """\
36-
// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
33+
license2 = """// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
3734
// file at the top-level directory of this distribution and at
3835
// http://rust-lang.org/COPYRIGHT.
3936
//
@@ -44,8 +41,7 @@
4441
// except according to those terms.
4542
"""
4643

47-
license3 = """\
48-
# Copyright 2013 The Rust Project Developers. See the COPYRIGHT
44+
license3 = """# Copyright 2013 The Rust Project Developers. See the COPYRIGHT
4945
# file at the top-level directory of this distribution and at
5046
# http://rust-lang.org/COPYRIGHT.
5147
#
@@ -56,19 +52,7 @@
5652
# except according to those terms.
5753
"""
5854

59-
license4 = """\
60-
// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT
61-
// file at the top-level directory of this distribution and at
62-
// http://rust-lang.org/COPYRIGHT.
63-
//
64-
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
65-
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
66-
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
67-
// option. This file may not be copied, modified, or distributed
68-
// except according to those terms.
69-
"""
70-
71-
licenses = [license0, license1, license2, license3, license4]
55+
licenses = [license0, license1, license2, license3]
7256

7357
exceptions = [
7458
"rt/rust_android_dummy.cpp", # BSD, chromium

branches/dist-snap/src/libcargo/cargo.rc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1553,7 +1553,7 @@ pub fn cmd_list(c: &Cargo) {
15531553
sync(c);
15541554

15551555
if vec::len(c.opts.free) >= 3u {
1556-
let v = vec::view(c.opts.free, 2u, vec::len(c.opts.free));
1556+
let v = vec::slice(c.opts.free, 2u, vec::len(c.opts.free));
15571557
for vec::each(v) |name| {
15581558
if !valid_pkg_name(*name) {
15591559
error(fmt!("'%s' is an invalid source name", *name));

branches/dist-snap/src/libcore/hashmap.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ pub mod linear {
159159
pure fn value_for_bucket(&self, idx: uint) -> &self/V {
160160
match self.buckets[idx] {
161161
Some(ref bkt) => &bkt.value,
162-
None => fail!(~"LinearMap::find: internal logic error"),
162+
None => die!(~"LinearMap::find: internal logic error"),
163163
}
164164
}
165165
@@ -373,7 +373,7 @@ pub mod linear {
373373
374374
let hash = k.hash_keyed(self.k0, self.k1) as uint;
375375
let idx = match self.bucket_for_key_with_hash(hash, &k) {
376-
TableFull => fail!(~"Internal logic error"),
376+
TableFull => die!(~"Internal logic error"),
377377
FoundEntry(idx) => idx,
378378
FoundHole(idx) => {
379379
self.buckets[idx] = Some(Bucket{hash: hash, key: k,
@@ -403,7 +403,7 @@ pub mod linear {
403403
404404
let hash = k.hash_keyed(self.k0, self.k1) as uint;
405405
let idx = match self.bucket_for_key_with_hash(hash, &k) {
406-
TableFull => fail!(~"Internal logic error"),
406+
TableFull => die!(~"Internal logic error"),
407407
FoundEntry(idx) => idx,
408408
FoundHole(idx) => {
409409
let v = f(&k);

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ impl<T: Reader> ReaderUtil for T {
246246
// over-read by reading 1-byte per char needed
247247
nbread = if ncreq > nbreq { ncreq } else { nbreq };
248248
if nbread > 0 {
249-
bytes = vec::slice(bytes, offset, bytes.len());
249+
bytes = vec::slice(bytes, offset, bytes.len()).to_vec();
250250
}
251251
}
252252
move chars
@@ -531,7 +531,7 @@ impl Reader for BytesReader {
531531
fn read(&self, bytes: &mut [u8], len: uint) -> uint {
532532
let count = uint::min(len, self.bytes.len() - self.pos);
533533
534-
let view = vec::view(self.bytes, self.pos, self.bytes.len());
534+
let view = vec::slice(self.bytes, self.pos, self.bytes.len());
535535
vec::bytes::copy_memory(bytes, view, count);
536536
537537
self.pos += count;
@@ -1008,7 +1008,7 @@ impl Writer for BytesWriter {
10081008
unsafe { vec::raw::set_len(&mut bytes, count); }
10091009
10101010
{
1011-
let view = vec::mut_view(bytes, self.pos, count);
1011+
let view = vec::mut_slice(bytes, self.pos, count);
10121012
vec::bytes::copy_memory(view, v, v_len);
10131013
}
10141014

branches/dist-snap/src/libcore/num/f32.rs

Lines changed: 14 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ use cmath;
1414
use cmp;
1515
use libc::{c_float, c_int};
1616
use num::NumCast;
17-
use num::strconv;
1817
use num;
1918
use ops;
2019
use option::Option;
@@ -377,8 +376,8 @@ impl num::Round for f32 {
377376
*/
378377
#[inline(always)]
379378
pub pure fn to_str(num: f32) -> ~str {
380-
let (r, _) = strconv::to_str_common(
381-
&num, 10u, true, strconv::SignNeg, strconv::DigAll);
379+
let (r, _) = num::to_str_common(
380+
&num, 10u, true, true, num::SignNeg, num::DigAll);
382381
r
383382
}
384383

@@ -391,8 +390,8 @@ pub pure fn to_str(num: f32) -> ~str {
391390
*/
392391
#[inline(always)]
393392
pub pure fn to_str_hex(num: f32) -> ~str {
394-
let (r, _) = strconv::to_str_common(
395-
&num, 16u, true, strconv::SignNeg, strconv::DigAll);
393+
let (r, _) = num::to_str_common(
394+
&num, 16u, true, true, num::SignNeg, num::DigAll);
396395
r
397396
}
398397

@@ -412,8 +411,8 @@ pub pure fn to_str_hex(num: f32) -> ~str {
412411
*/
413412
#[inline(always)]
414413
pub pure fn to_str_radix(num: f32, rdx: uint) -> ~str {
415-
let (r, special) = strconv::to_str_common(
416-
&num, rdx, true, strconv::SignNeg, strconv::DigAll);
414+
let (r, special) = num::to_str_common(
415+
&num, rdx, true, true, num::SignNeg, num::DigAll);
417416
if special { fail!(~"number has a special value, \
418417
try to_str_radix_special() if those are expected") }
419418
r
@@ -430,8 +429,7 @@ pub pure fn to_str_radix(num: f32, rdx: uint) -> ~str {
430429
*/
431430
#[inline(always)]
432431
pub pure fn to_str_radix_special(num: f32, rdx: uint) -> (~str, bool) {
433-
strconv::to_str_common(&num, rdx, true,
434-
strconv::SignNeg, strconv::DigAll)
432+
num::to_str_common(&num, rdx, true, true, num::SignNeg, num::DigAll)
435433
}
436434

437435
/**
@@ -445,8 +443,8 @@ pub pure fn to_str_radix_special(num: f32, rdx: uint) -> (~str, bool) {
445443
*/
446444
#[inline(always)]
447445
pub pure fn to_str_exact(num: f32, dig: uint) -> ~str {
448-
let (r, _) = strconv::to_str_common(
449-
&num, 10u, true, strconv::SignNeg, strconv::DigExact(dig));
446+
let (r, _) = num::to_str_common(
447+
&num, 10u, true, true, num::SignNeg, num::DigExact(dig));
450448
r
451449
}
452450

@@ -461,8 +459,8 @@ pub pure fn to_str_exact(num: f32, dig: uint) -> ~str {
461459
*/
462460
#[inline(always)]
463461
pub pure fn to_str_digits(num: f32, dig: uint) -> ~str {
464-
let (r, _) = strconv::to_str_common(
465-
&num, 10u, true, strconv::SignNeg, strconv::DigMax(dig));
462+
let (r, _) = num::to_str_common(
463+
&num, 10u, true, true, num::SignNeg, num::DigMax(dig));
466464
r
467465
}
468466

@@ -507,8 +505,7 @@ impl num::ToStrRadix for f32 {
507505
*/
508506
#[inline(always)]
509507
pub pure fn from_str(num: &str) -> Option<f32> {
510-
strconv::from_str_common(num, 10u, true, true, true,
511-
strconv::ExpDec, false)
508+
num::from_str_common(num, 10u, true, true, true, num::ExpDec, false)
512509
}
513510

514511
/**
@@ -540,8 +537,7 @@ pub pure fn from_str(num: &str) -> Option<f32> {
540537
*/
541538
#[inline(always)]
542539
pub pure fn from_str_hex(num: &str) -> Option<f32> {
543-
strconv::from_str_common(num, 16u, true, true, true,
544-
strconv::ExpBin, false)
540+
num::from_str_common(num, 16u, true, true, true, num::ExpBin, false)
545541
}
546542

547543
/**
@@ -565,8 +561,7 @@ pub pure fn from_str_hex(num: &str) -> Option<f32> {
565561
*/
566562
#[inline(always)]
567563
pub pure fn from_str_radix(num: &str, rdx: uint) -> Option<f32> {
568-
strconv::from_str_common(num, rdx, true, true, false,
569-
strconv::ExpNone, false)
564+
num::from_str_common(num, rdx, true, true, false, num::ExpNone, false)
570565
}
571566

572567
impl from_str::FromStr for f32 {

branches/dist-snap/src/libcore/num/f64.rs

Lines changed: 14 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ use cmp;
1515
use libc::{c_double, c_int};
1616
use libc;
1717
use num::NumCast;
18-
use num::strconv;
1918
use num;
2019
use ops;
2120
use option::Option;
@@ -402,8 +401,8 @@ impl num::Round for f64 {
402401
*/
403402
#[inline(always)]
404403
pub pure fn to_str(num: f64) -> ~str {
405-
let (r, _) = strconv::to_str_common(
406-
&num, 10u, true, strconv::SignNeg, strconv::DigAll);
404+
let (r, _) = num::to_str_common(
405+
&num, 10u, true, true, num::SignNeg, num::DigAll);
407406
r
408407
}
409408

@@ -416,8 +415,8 @@ pub pure fn to_str(num: f64) -> ~str {
416415
*/
417416
#[inline(always)]
418417
pub pure fn to_str_hex(num: f64) -> ~str {
419-
let (r, _) = strconv::to_str_common(
420-
&num, 16u, true, strconv::SignNeg, strconv::DigAll);
418+
let (r, _) = num::to_str_common(
419+
&num, 16u, true, true, num::SignNeg, num::DigAll);
421420
r
422421
}
423422

@@ -437,8 +436,8 @@ pub pure fn to_str_hex(num: f64) -> ~str {
437436
*/
438437
#[inline(always)]
439438
pub pure fn to_str_radix(num: f64, rdx: uint) -> ~str {
440-
let (r, special) = strconv::to_str_common(
441-
&num, rdx, true, strconv::SignNeg, strconv::DigAll);
439+
let (r, special) = num::to_str_common(
440+
&num, rdx, true, true, num::SignNeg, num::DigAll);
442441
if special { fail!(~"number has a special value, \
443442
try to_str_radix_special() if those are expected") }
444443
r
@@ -455,8 +454,7 @@ pub pure fn to_str_radix(num: f64, rdx: uint) -> ~str {
455454
*/
456455
#[inline(always)]
457456
pub pure fn to_str_radix_special(num: f64, rdx: uint) -> (~str, bool) {
458-
strconv::to_str_common(&num, rdx, true,
459-
strconv::SignNeg, strconv::DigAll)
457+
num::to_str_common(&num, rdx, true, true, num::SignNeg, num::DigAll)
460458
}
461459

462460
/**
@@ -470,8 +468,8 @@ pub pure fn to_str_radix_special(num: f64, rdx: uint) -> (~str, bool) {
470468
*/
471469
#[inline(always)]
472470
pub pure fn to_str_exact(num: f64, dig: uint) -> ~str {
473-
let (r, _) = strconv::to_str_common(
474-
&num, 10u, true, strconv::SignNeg, strconv::DigExact(dig));
471+
let (r, _) = num::to_str_common(
472+
&num, 10u, true, true, num::SignNeg, num::DigExact(dig));
475473
r
476474
}
477475

@@ -486,8 +484,8 @@ pub pure fn to_str_exact(num: f64, dig: uint) -> ~str {
486484
*/
487485
#[inline(always)]
488486
pub pure fn to_str_digits(num: f64, dig: uint) -> ~str {
489-
let (r, _) = strconv::to_str_common(
490-
&num, 10u, true, strconv::SignNeg, strconv::DigMax(dig));
487+
let (r, _) = num::to_str_common(
488+
&num, 10u, true, true, num::SignNeg, num::DigMax(dig));
491489
r
492490
}
493491

@@ -532,8 +530,7 @@ impl num::ToStrRadix for f64 {
532530
*/
533531
#[inline(always)]
534532
pub pure fn from_str(num: &str) -> Option<f64> {
535-
strconv::from_str_common(num, 10u, true, true, true,
536-
strconv::ExpDec, false)
533+
num::from_str_common(num, 10u, true, true, true, num::ExpDec, false)
537534
}
538535

539536
/**
@@ -565,8 +562,7 @@ pub pure fn from_str(num: &str) -> Option<f64> {
565562
*/
566563
#[inline(always)]
567564
pub pure fn from_str_hex(num: &str) -> Option<f64> {
568-
strconv::from_str_common(num, 16u, true, true, true,
569-
strconv::ExpBin, false)
565+
num::from_str_common(num, 16u, true, true, true, num::ExpBin, false)
570566
}
571567

572568
/**
@@ -590,8 +586,7 @@ pub pure fn from_str_hex(num: &str) -> Option<f64> {
590586
*/
591587
#[inline(always)]
592588
pub pure fn from_str_radix(num: &str, rdx: uint) -> Option<f64> {
593-
strconv::from_str_common(num, rdx, true, true, false,
594-
strconv::ExpNone, false)
589+
num::from_str_common(num, rdx, true, true, false, num::ExpNone, false)
595590
}
596591

597592
impl from_str::FromStr for f64 {

0 commit comments

Comments
 (0)