diff options
| author | bors <bors@rust-lang.org> | 2014-01-27 09:31:44 -0800 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-01-27 09:31:44 -0800 |
| commit | d6d7812da841ddedf6c765eebb655be9866956ce (patch) | |
| tree | 462e190485176d8089f3212a8acdfe783e447fbd /src/libstd | |
| parent | be974bf499a977530703fd62b3794a9377b6cbc4 (diff) | |
| parent | 15ba0c310a2bfe2ab69670d0d87529a29d527973 (diff) | |
| download | rust-d6d7812da841ddedf6c765eebb655be9866956ce.tar.gz rust-d6d7812da841ddedf6c765eebb655be9866956ce.zip | |
auto merge of #11595 : eddyb/rust/env-et-self-no-more, r=nikomatsakis
Non-exhaustive change list: * `self` is now present in argument lists (modulo type-checking code I don't trust myself to refactor) * methods have the same calling convention as bare functions (including the self argument) * the env param is gone from all bare functions (and methods), only used by closures and `proc`s * bare functions can only be coerced to closures and `proc`s if they are statically resolved, as they now require creating a wrapper specific to that function, to avoid indirect wrappers (equivalent to `impl<..Args, Ret> Fn<..Args, Ret> for fn(..Args) -> Ret`) that might not be optimizable by LLVM and don't work for `proc`s * refactored some `trans::closure` code, leading to the removal of `trans::glue::make_free_glue` and `ty_opaque_closure_ptr`
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/io/buffered.rs | 2 | ||||
| -rw-r--r-- | src/libstd/reflect.rs | 9 | ||||
| -rw-r--r-- | src/libstd/repr.rs | 10 | ||||
| -rw-r--r-- | src/libstd/unstable/intrinsics.rs | 4 |
4 files changed, 8 insertions, 17 deletions
diff --git a/src/libstd/io/buffered.rs b/src/libstd/io/buffered.rs index 745273a1d74..64e42c5480f 100644 --- a/src/libstd/io/buffered.rs +++ b/src/libstd/io/buffered.rs @@ -230,7 +230,7 @@ impl<W: Writer> LineBufferedWriter<W> { /// Unwraps this buffer, returning the underlying writer. /// /// The internal buffer is flushed before returning the writer. - pub fn unwrap(mut self) -> W { self.inner.unwrap() } + pub fn unwrap(self) -> W { self.inner.unwrap() } } impl<W: Writer> Writer for LineBufferedWriter<W> { diff --git a/src/libstd/reflect.rs b/src/libstd/reflect.rs index c0af649f26c..87655f5911f 100644 --- a/src/libstd/reflect.rs +++ b/src/libstd/reflect.rs @@ -451,13 +451,8 @@ impl<V:TyVisitor + MovePtr> TyVisitor for MovePtrAdaptor<V> { true } - fn visit_opaque_box(&mut self) -> bool { - self.align_to::<@u8>(); - if ! self.inner.visit_opaque_box() { return false; } - self.bump_past::<@u8>(); - true - } - + // NOTE remove after next snapshot + #[cfg(stage0)] fn visit_closure_ptr(&mut self, ck: uint) -> bool { self.align_to::<proc()>(); if ! self.inner.visit_closure_ptr(ck) { diff --git a/src/libstd/repr.rs b/src/libstd/repr.rs index e3b34147c01..1ecc31ec2f4 100644 --- a/src/libstd/repr.rs +++ b/src/libstd/repr.rs @@ -580,14 +580,8 @@ impl<'a> TyVisitor for ReprVisitor<'a> { fn visit_self(&mut self) -> bool { true } fn visit_type(&mut self) -> bool { true } - fn visit_opaque_box(&mut self) -> bool { - self.writer.write(['@' as u8]); - self.get::<&raw::Box<()>>(|this, b| { - let p = ptr::to_unsafe_ptr(&b.data) as *u8; - this.visit_ptr_inner(p, b.type_desc); - }) - } - + // NOTE remove after next snapshot + #[cfg(stage0)] fn visit_closure_ptr(&mut self, _ck: uint) -> bool { true } } diff --git a/src/libstd/unstable/intrinsics.rs b/src/libstd/unstable/intrinsics.rs index 198df3090ee..1988993707f 100644 --- a/src/libstd/unstable/intrinsics.rs +++ b/src/libstd/unstable/intrinsics.rs @@ -164,7 +164,9 @@ pub trait TyVisitor { fn visit_param(&mut self, i: uint) -> bool; fn visit_self(&mut self) -> bool; fn visit_type(&mut self) -> bool; - fn visit_opaque_box(&mut self) -> bool; + + // NOTE remove after next snapshot + #[cfg(stage0)] fn visit_closure_ptr(&mut self, ck: uint) -> bool; } |
