diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2014-10-02 14:53:18 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2014-10-02 14:53:18 -0700 |
| commit | 7ae802f57bf8a1ac2a47760a936c56e6fff16821 (patch) | |
| tree | a6063128be15d8bb988d61b4ce695eafd8fb1ec6 /src/liballoc | |
| parent | ebe4da971aa4b2a9db597b682b96133f373dbec5 (diff) | |
| parent | 58bea31ca0e11bf49439d33e1d21f11de7161567 (diff) | |
| download | rust-7ae802f57bf8a1ac2a47760a936c56e6fff16821.tar.gz rust-7ae802f57bf8a1ac2a47760a936c56e6fff16821.zip | |
rollup merge of #17666 : eddyb/take-garbage-out
Conflicts: src/libcollections/lib.rs src/libcore/lib.rs src/librustdoc/lib.rs src/librustrt/lib.rs src/libserialize/lib.rs src/libstd/lib.rs src/test/run-pass/issue-8898.rs
Diffstat (limited to 'src/liballoc')
| -rw-r--r-- | src/liballoc/lib.rs | 1 | ||||
| -rw-r--r-- | src/liballoc/rc.rs | 8 | ||||
| -rw-r--r-- | src/liballoc/util.rs | 30 |
3 files changed, 0 insertions, 39 deletions
diff --git a/src/liballoc/lib.rs b/src/liballoc/lib.rs index 503c484e469..c31d746d8f2 100644 --- a/src/liballoc/lib.rs +++ b/src/liballoc/lib.rs @@ -92,7 +92,6 @@ pub use boxed as owned; pub mod heap; pub mod libc_heap; -pub mod util; // Primitive types using the heaps above diff --git a/src/liballoc/rc.rs b/src/liballoc/rc.rs index ec19844a24a..049bf4eb1b0 100644 --- a/src/liballoc/rc.rs +++ b/src/liballoc/rc.rs @@ -542,14 +542,6 @@ mod tests { } #[test] - fn gc_inside() { - // see issue #11532 - use std::gc::GC; - let a = Rc::new(RefCell::new(box(GC) 1i)); - assert!(a.try_borrow_mut().is_some()); - } - - #[test] fn weak_self_cyclic() { struct Cycle { x: RefCell<Option<Weak<Cycle>>> diff --git a/src/liballoc/util.rs b/src/liballoc/util.rs deleted file mode 100644 index d5f0d25fb01..00000000000 --- a/src/liballoc/util.rs +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright 2013 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or -// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license -// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -#![doc(hidden)] - -use core::mem; -use core::raw; - -#[inline] -#[deprecated] -pub fn get_box_size(body_size: uint, body_align: uint) -> uint { - let header_size = mem::size_of::<raw::GcBox<()>>(); - let total_size = align_to(header_size, body_align) + body_size; - total_size -} - -// Rounds size to the next alignment. Alignment is required to be a power of -// two. -#[inline] -fn align_to(size: uint, align: uint) -> uint { - assert!(align != 0); - (size + align - 1) & !(align - 1) -} |
