Skip to content

Commit 5c975e1

Browse files
committed
---
yaml --- r: 62968 b: refs/heads/snap-stage3 c: fe70361 h: refs/heads/master v: v3
1 parent 12b360e commit 5c975e1

File tree

10 files changed

+121
-225
lines changed

10 files changed

+121
-225
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: 2d28d645422c1617be58c8ca7ad9a457264ca850
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 5ddbc881c52a111da2e61772ec5f7b2826f3d9cb
4+
refs/heads/snap-stage3: fe70361bb6d89a6226d558c64c03d05bba46412b
55
refs/heads/try: 7b78b52e602bb3ea8174f9b2006bff3315f03ef9
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/src/librustc/middle/trans/base.rs

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1730,15 +1730,8 @@ pub fn copy_args_to_allocas(fcx: fn_ctxt,
17301730
// We really should do this regardless of whether self is owned, but
17311731
// it doesn't work right with default method impls yet. (FIXME: #2794)
17321732
if slf.is_owned {
1733-
let self_val = if datum::appropriate_mode(slf.t).is_by_value() {
1734-
let tmp = BitCast(bcx, slf.v, type_of(bcx.ccx(), slf.t));
1735-
let alloc = alloc_ty(bcx, slf.t);
1736-
Store(bcx, tmp, alloc);
1737-
alloc
1738-
} else {
1739-
PointerCast(bcx, slf.v, T_ptr(type_of(bcx.ccx(), slf.t)))
1740-
};
1741-
1733+
let self_val = PointerCast(bcx, slf.v,
1734+
T_ptr(type_of(bcx.ccx(), slf.t)));
17421735
fcx.llself = Some(ValSelfData {v: self_val, ..slf});
17431736
add_clean(bcx, self_val, slf.t);
17441737
}

branches/snap-stage3/src/libstd/pipes.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ use option::{None, Option, Some};
9494
use unstable::finally::Finally;
9595
use unstable::intrinsics;
9696
use ptr;
97-
use ptr::RawPtr;
97+
use ptr::Ptr;
9898
use task;
9999
use vec;
100100
use vec::OwnedVector;

branches/snap-stage3/src/libstd/prelude.rs

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

11-
//! The Rust prelude. Imported into every module by default.
11+
/*!
12+
13+
Many programming languages have a 'prelude': a particular subset of the
14+
libraries that come with the language. Every program imports the prelude by
15+
default.
16+
17+
For example, it would be annoying to add `use io::println;` to every single
18+
program, and the vast majority of Rust programs will wish to print to standard
19+
output. Therefore, it makes sense to import it into every program.
20+
21+
Rust's prelude has three main parts:
22+
23+
1. io::print and io::println.
24+
2. Core operators, such as `Add`, `Mul`, and `Not`.
25+
3. Various types and traits, such as `Clone`, `Eq`, and `comm::Chan`.
26+
27+
*/
28+
1229

1330
// Reexported core operators
1431
pub use either::{Either, Left, Right};
@@ -43,9 +60,9 @@ pub use path::GenericPath;
4360
pub use path::Path;
4461
pub use path::PosixPath;
4562
pub use path::WindowsPath;
46-
pub use ptr::RawPtr;
63+
pub use ptr::Ptr;
4764
pub use ascii::{Ascii, AsciiCast, OwnedAsciiCast, AsciiStr};
48-
pub use str::{StrVector, StrSlice, OwnedStr, StrUtil};
65+
pub use str::{StrSlice, OwnedStr, StrUtil};
4966
pub use from_str::{FromStr};
5067
pub use to_bytes::IterBytes;
5168
pub use to_str::{ToStr, ToStrConsume};
@@ -56,7 +73,7 @@ pub use tuple::{CloneableTuple10, CloneableTuple11, CloneableTuple12};
5673
pub use tuple::{ImmutableTuple2, ImmutableTuple3, ImmutableTuple4, ImmutableTuple5};
5774
pub use tuple::{ImmutableTuple6, ImmutableTuple7, ImmutableTuple8, ImmutableTuple9};
5875
pub use tuple::{ImmutableTuple10, ImmutableTuple11, ImmutableTuple12};
59-
pub use vec::{VectorVector, CopyableVector, ImmutableVector};
76+
pub use vec::{CopyableVector, ImmutableVector};
6077
pub use vec::{ImmutableEqVector, ImmutableCopyableVector};
6178
pub use vec::{OwnedVector, OwnedCopyableVector, MutableVector};
6279
pub use io::{Reader, ReaderUtil, Writer, WriterUtil};

branches/snap-stage3/src/libstd/ptr.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -296,15 +296,15 @@ pub unsafe fn array_each<T>(arr: **T, cb: &fn(*T)) {
296296
}
297297

298298
#[allow(missing_doc)]
299-
pub trait RawPtr<T> {
299+
pub trait Ptr<T> {
300300
fn is_null(&const self) -> bool;
301301
fn is_not_null(&const self) -> bool;
302302
unsafe fn to_option(&const self) -> Option<&T>;
303303
fn offset(&self, count: uint) -> Self;
304304
}
305305

306306
/// Extension methods for immutable pointers
307-
impl<T> RawPtr<T> for *T {
307+
impl<T> Ptr<T> for *T {
308308
/// Returns true if the pointer is equal to the null pointer.
309309
#[inline(always)]
310310
fn is_null(&const self) -> bool { is_null(*self) }
@@ -336,7 +336,7 @@ impl<T> RawPtr<T> for *T {
336336
}
337337

338338
/// Extension methods for mutable pointers
339-
impl<T> RawPtr<T> for *mut T {
339+
impl<T> Ptr<T> for *mut T {
340340
/// Returns true if the pointer is equal to the null pointer.
341341
#[inline(always)]
342342
fn is_null(&const self) -> bool { is_null(*self) }

branches/snap-stage3/src/libstd/rt/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ Several modules in `core` are clients of `rt`:
5656

5757
#[doc(hidden)];
5858

59-
use ptr::RawPtr;
59+
use ptr::Ptr;
6060

6161
/// The global (exchange) heap.
6262
pub mod global_heap;

branches/snap-stage3/src/libstd/rt/stack.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// except according to those terms.
1010

1111
use container::Container;
12-
use ptr::RawPtr;
12+
use ptr::Ptr;
1313
use vec;
1414
use ops::Drop;
1515
use libc::{c_uint, uintptr_t};

branches/snap-stage3/src/libstd/rt/uv/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ use container::Container;
3838
use option::*;
3939
use str::raw::from_c_str;
4040
use to_str::ToStr;
41-
use ptr::RawPtr;
41+
use ptr::Ptr;
4242
use libc;
4343
use vec;
4444
use ptr;

0 commit comments

Comments
 (0)