Skip to content

Commit 029b13f

Browse files
committed
---
yaml --- r: 59891 b: refs/heads/master c: 6883814 h: refs/heads/master i: 59889: cfa09d4 59887: beda4af v: v3
1 parent 4755a93 commit 029b13f

File tree

16 files changed

+21
-99
lines changed

16 files changed

+21
-99
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: cff6aba76ea01888854a87bdd4c1f71aada8d250
2+
refs/heads/master: 6883814a84d584e1fd65a1d40229807ff3d34efb
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 2d28d645422c1617be58c8ca7ad9a457264ca850
55
refs/heads/try: c50a9d5b664478e533ba1d1d353213d70c8ad589

trunk/src/libcore/bool.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,6 @@ mod tests {
108108

109109
#[test]
110110
fn test_bool_from_str() {
111-
#[cfg(stage0)]
112111
use from_str::FromStr;
113112

114113
do all_values |v| {

trunk/src/libcore/cast.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,7 @@
1010

1111
//! Unsafe casting functions
1212
13-
#[cfg(not(stage0))]
1413
use sys;
15-
#[cfg(not(stage0))]
1614
use unstable;
1715

1816
pub mod rusti {

trunk/src/libcore/core.rc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@ pub use num::{Bitwise, BitCount, Bounded};
111111
pub use num::{Primitive, Int, Float};
112112

113113
pub use ptr::Ptr;
114-
pub use from_str::FromStr;
115114
pub use to_str::ToStr;
116115
pub use clone::Clone;
117116

trunk/src/libcore/flate.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ Simple compression
1616

1717
use libc;
1818
use libc::{c_void, size_t, c_int};
19+
use ptr;
1920
use vec;
2021

2122
#[cfg(test)] use rand;

trunk/src/libcore/num/f32.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
//! Operations and constants for `f32`
1212
13+
use from_str;
1314
use num::{Zero, One, strconv};
1415
use prelude::*;
1516

@@ -797,7 +798,7 @@ pub fn from_str_radix(num: &str, rdx: uint) -> Option<f32> {
797798
strconv::ExpNone, false, false)
798799
}
799800
800-
impl FromStr for f32 {
801+
impl from_str::FromStr for f32 {
801802
#[inline(always)]
802803
fn from_str(val: &str) -> Option<f32> { from_str(val) }
803804
}

trunk/src/libcore/num/f64.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
//! Operations and constants for `f64`
1212
13+
use from_str;
1314
use libc::c_int;
1415
use num::{Zero, One, strconv};
1516
use prelude::*;
@@ -839,7 +840,7 @@ pub fn from_str_radix(num: &str, rdx: uint) -> Option<f64> {
839840
strconv::ExpNone, false, false)
840841
}
841842
842-
impl FromStr for f64 {
843+
impl from_str::FromStr for f64 {
843844
#[inline(always)]
844845
fn from_str(val: &str) -> Option<f64> { from_str(val) }
845846
}

trunk/src/libcore/num/float.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020

2121
// PORT this must match in width according to architecture
2222

23+
use from_str;
2324
use libc::c_int;
2425
use num::{Zero, One, strconv};
2526
use prelude::*;
@@ -288,7 +289,7 @@ pub fn from_str_radix(num: &str, radix: uint) -> Option<float> {
288289
strconv::ExpNone, false, false)
289290
}
290291
291-
impl FromStr for float {
292+
impl from_str::FromStr for float {
292293
#[inline(always)]
293294
fn from_str(val: &str) -> Option<float> { from_str(val) }
294295
}

trunk/src/libcore/num/int-template.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
use T = self::inst::T;
1212

13+
use from_str::FromStr;
1314
use num::{ToStrRadix, FromStrRadix};
1415
use num::{Zero, One, strconv};
1516
use prelude::*;

trunk/src/libcore/num/uint-template.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
use T = self::inst::T;
1212
use T_SIGNED = self::inst::T_SIGNED;
1313

14+
use from_str::FromStr;
1415
use num::{ToStrRadix, FromStrRadix};
1516
use num::{Zero, One, strconv};
1617
use prelude::*;

trunk/src/libcore/pipes.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ struct BufferResource<T> {
303303
}
304304
305305
#[unsafe_destructor]
306-
impl<T> Drop for BufferResource<T> {
306+
impl<T> ::ops::Drop for BufferResource<T> {
307307
fn finalize(&self) {
308308
unsafe {
309309
let b = move_it!(self.buffer);
@@ -639,7 +639,7 @@ pub struct SendPacketBuffered<T, Tbuffer> {
639639
}
640640
641641
#[unsafe_destructor]
642-
impl<T:Owned,Tbuffer:Owned> Drop for SendPacketBuffered<T,Tbuffer> {
642+
impl<T:Owned,Tbuffer:Owned> ::ops::Drop for SendPacketBuffered<T,Tbuffer> {
643643
fn finalize(&self) {
644644
//if self.p != none {
645645
// debug!("drop send %?", option::get(self.p));
@@ -708,7 +708,7 @@ pub struct RecvPacketBuffered<T, Tbuffer> {
708708
}
709709
710710
#[unsafe_destructor]
711-
impl<T:Owned,Tbuffer:Owned> Drop for RecvPacketBuffered<T,Tbuffer> {
711+
impl<T:Owned,Tbuffer:Owned> ::ops::Drop for RecvPacketBuffered<T,Tbuffer> {
712712
fn finalize(&self) {
713713
//if self.p != none {
714714
// debug!("drop recv %?", option::get(self.p));

trunk/src/libcore/prelude.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ pub use path::WindowsPath;
5151
pub use ptr::Ptr;
5252
pub use ascii::{Ascii, AsciiCast, OwnedAsciiCast, AsciiStr};
5353
pub use str::{StrSlice, OwnedStr};
54-
pub use from_str::{FromStr};
5554
pub use to_bytes::IterBytes;
5655
pub use to_str::{ToStr, ToStrConsume};
5756
pub use tuple::{CopyableTuple, ImmutableTuple, ExtendedTupleOps};

trunk/src/librustc/middle/ty.rs

Lines changed: 0 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -1818,15 +1818,6 @@ pub impl TypeContents {
18181818
if cx.vecs_implicitly_copyable {base} else {base + TC_OWNED_VEC}
18191819
}
18201820
1821-
fn is_safe_for_default_mode(&self, cx: ctxt) -> bool {
1822-
!self.intersects(TypeContents::nondefault_mode(cx))
1823-
}
1824-
1825-
fn nondefault_mode(cx: ctxt) -> TypeContents {
1826-
let tc = TypeContents::nonimplicitly_copyable(cx);
1827-
tc + TC_BIG + TC_OWNED_VEC // disregard cx.vecs_implicitly_copyable
1828-
}
1829-
18301821
fn needs_drop(&self, cx: ctxt) -> bool {
18311822
let tc = TC_MANAGED + TC_DTOR + TypeContents::owned(cx);
18321823
self.intersects(tc)
@@ -1886,9 +1877,6 @@ static TC_MUTABLE: TypeContents = TypeContents{bits:0b000010000000};
18861877
/// Mutable content, whether owned or by ref
18871878
static TC_ONCE_CLOSURE: TypeContents = TypeContents{bits:0b000100000000};
18881879
1889-
/// Something we estimate to be "big"
1890-
static TC_BIG: TypeContents = TypeContents{bits:0b001000000000};
1891-
18921880
/// An enum with no variants.
18931881
static TC_EMPTY_ENUM: TypeContents = TypeContents{bits:0b010000000000};
18941882
@@ -2109,10 +2097,6 @@ pub fn type_contents(cx: ctxt, ty: t) -> TypeContents {
21092097
}
21102098
};
21112099
2112-
if type_size(cx, ty) > 4 {
2113-
result = result + TC_BIG;
2114-
}
2115-
21162100
cache.insert(ty_id, result);
21172101
return result;
21182102
}
@@ -2188,68 +2172,6 @@ pub fn type_contents(cx: ctxt, ty: t) -> TypeContents {
21882172
debug!("result = %s", r.to_str());
21892173
return r;
21902174
}
2191-
2192-
/// gives a rough estimate of how much space it takes to represent
2193-
/// an instance of `ty`. Used for the mode transition.
2194-
fn type_size(cx: ctxt, ty: t) -> uint {
2195-
match get(ty).sty {
2196-
ty_nil | ty_bot | ty_bool | ty_int(_) | ty_uint(_) | ty_float(_) |
2197-
ty_ptr(_) | ty_box(_) | ty_uniq(_) | ty_estr(vstore_uniq) |
2198-
ty_trait(*) | ty_rptr(*) | ty_evec(_, vstore_uniq) |
2199-
ty_evec(_, vstore_box) | ty_estr(vstore_box) => {
2200-
1
2201-
}
2202-
2203-
ty_evec(_, vstore_slice(_)) |
2204-
ty_estr(vstore_slice(_)) |
2205-
ty_bare_fn(*) |
2206-
ty_closure(*) => {
2207-
2
2208-
}
2209-
2210-
ty_evec(t, vstore_fixed(n)) => {
2211-
type_size(cx, t.ty) * n
2212-
}
2213-
2214-
ty_estr(vstore_fixed(n)) => {
2215-
n
2216-
}
2217-
2218-
ty_struct(did, ref substs) => {
2219-
let flds = struct_fields(cx, did, substs);
2220-
flds.foldl(0, |s, f| *s + type_size(cx, f.mt.ty))
2221-
}
2222-
2223-
ty_tup(ref tys) => {
2224-
tys.foldl(0, |s, t| *s + type_size(cx, *t))
2225-
}
2226-
2227-
ty_enum(did, ref substs) => {
2228-
let variants = substd_enum_variants(cx, did, substs);
2229-
variants.foldl( // find max size of any variant
2230-
0,
2231-
|m, v| uint::max(
2232-
*m,
2233-
// find size of this variant:
2234-
v.args.foldl(0, |s, a| *s + type_size(cx, *a))))
2235-
}
2236-
2237-
ty_param(_) | ty_self(_) => {
2238-
1
2239-
}
2240-
2241-
ty_infer(_) => {
2242-
cx.sess.bug(~"Asked to compute kind of a type variable");
2243-
}
2244-
ty_type => 1,
2245-
ty_opaque_closure_ptr(_) => 1,
2246-
ty_opaque_box => 1,
2247-
ty_unboxed_vec(_) => 10,
2248-
ty_err => {
2249-
cx.sess.bug(~"Asked to compute kind of fictitious type");
2250-
}
2251-
}
2252-
}
22532175
}
22542176
22552177
pub fn type_moves_by_default(cx: ctxt, ty: t) -> bool {

trunk/src/libstd/net_url.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,15 @@
1313
#[allow(deprecated_mode)];
1414

1515
use core::cmp::Eq;
16-
#[cfg(stage0)]
1716
use core::from_str::FromStr;
1817
use core::io::{Reader, ReaderUtil};
1918
use core::io;
2019
use core::hashmap::HashMap;
2120
use core::str;
21+
use core::to_bytes::IterBytes;
2222
use core::to_bytes;
23+
use core::to_str::ToStr;
24+
use core::to_str;
2325
use core::uint;
2426

2527
#[deriving(Clone, Eq)]
@@ -701,13 +703,13 @@ pub fn to_str(url: &Url) -> ~str {
701703
fmt!("%s:%s%s%s%s", url.scheme, authority, url.path, query, fragment)
702704
}
703705

704-
impl ToStr for Url {
706+
impl to_str::ToStr for Url {
705707
pub fn to_str(&self) -> ~str {
706708
to_str(self)
707709
}
708710
}
709711

710-
impl IterBytes for Url {
712+
impl to_bytes::IterBytes for Url {
711713
fn iter_bytes(&self, lsb0: bool, f: to_bytes::Cb) {
712714
self.to_str().iter_bytes(lsb0, f)
713715
}

trunk/src/libstd/num/bigint.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ A BigInt is a combination of BigUint and Sign.
2121

2222
use core::cmp::{Eq, Ord, TotalEq, TotalOrd, Ordering, Less, Equal, Greater};
2323
use core::num::{IntConvertible, Zero, One, ToStrRadix, FromStrRadix};
24+
use core::*;
2425

2526
/**
2627
A BigDigit is a BigUint's composing element.
@@ -140,7 +141,7 @@ impl ToStr for BigUint {
140141
fn to_str(&self) -> ~str { self.to_str_radix(10) }
141142
}
142143

143-
impl FromStr for BigUint {
144+
impl from_str::FromStr for BigUint {
144145
#[inline(always)]
145146
fn from_str(s: &str) -> Option<BigUint> {
146147
FromStrRadix::from_str_radix(s, 10)
@@ -784,7 +785,7 @@ impl ToStr for BigInt {
784785
fn to_str(&self) -> ~str { self.to_str_radix(10) }
785786
}
786787

787-
impl FromStr for BigInt {
788+
impl from_str::FromStr for BigInt {
788789
#[inline(always)]
789790
fn from_str(s: &str) -> Option<BigInt> {
790791
FromStrRadix::from_str_radix(s, 10)

trunk/src/rt/rust_task.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -175,10 +175,6 @@
175175
#define RED_ZONE_SIZE RZ_MAC_32
176176
#endif
177177

178-
#ifndef RED_ZONE_SIZE
179-
# error "Red zone not defined for this platform"
180-
#endif
181-
182178
struct frame_glue_fns {
183179
uintptr_t mark_glue_off;
184180
uintptr_t drop_glue_off;

0 commit comments

Comments
 (0)