Skip to content

Commit 7ae802f

Browse files
committed
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
2 parents ebe4da9 + 58bea31 commit 7ae802f

File tree

287 files changed

+435
-5088
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

287 files changed

+435
-5088
lines changed

src/doc/guide-pointers.md

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -632,19 +632,6 @@ This part is coming soon.
632632

633633
This part is coming soon.
634634

635-
# Gc
636-
637-
The `Gc<T>` type exists for historical reasons, and is [still used
638-
internally](https://github.com/rust-lang/rust/issues/7929) by the compiler.
639-
It is not even a 'real' garbage collected type at the moment.
640-
641-
In the future, Rust may have a real garbage collected type, and so it
642-
has not yet been removed for that reason.
643-
644-
## Best practices
645-
646-
There is currently no legitimate use case for the `Gc<T>` type.
647-
648635
# Raw Pointers
649636

650637
This part is coming soon.

src/doc/guide-runtime.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ list):
3131
* Task synchronization
3232
* Task-local storage
3333
* Logging
34-
* Local heaps (GC heaps)
3534
* Task unwinding
3635

3736
## What is the runtime accomplishing?

src/doc/guide-unsafe.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -208,9 +208,7 @@ pub struct Unique<T> {
208208
// Implement methods for creating and using the values in the box.
209209
210210
// NB: For simplicity and correctness, we require that T has kind Send
211-
// (owned boxes relax this restriction, and can contain managed (GC) boxes).
212-
// This is because, as implemented, the garbage collector would not know
213-
// about any shared boxes stored in the malloc'd region of memory.
211+
// (owned boxes relax this restriction).
214212
impl<T: Send> Unique<T> {
215213
pub fn new(value: T) -> Unique<T> {
216214
unsafe {

src/doc/reference.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3381,7 +3381,7 @@ fn main() {
33813381
33823382
```
33833383

3384-
Patterns can also dereference pointers by using the `&`, `box` or `@` symbols,
3384+
Patterns can also dereference pointers by using the `&`, `box` symbols,
33853385
as appropriate. For example, these two matches on `x: &int` are equivalent:
33863386

33873387
```

src/liballoc/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,6 @@ pub use boxed as owned;
9292

9393
pub mod heap;
9494
pub mod libc_heap;
95-
pub mod util;
9695

9796
// Primitive types using the heaps above
9897

src/liballoc/rc.rs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -541,14 +541,6 @@ mod tests {
541541
assert!(y.upgrade().is_none());
542542
}
543543

544-
#[test]
545-
fn gc_inside() {
546-
// see issue #11532
547-
use std::gc::GC;
548-
let a = Rc::new(RefCell::new(box(GC) 1i));
549-
assert!(a.try_borrow_mut().is_some());
550-
}
551-
552544
#[test]
553545
fn weak_self_cyclic() {
554546
struct Cycle {

src/liballoc/util.rs

Lines changed: 0 additions & 30 deletions
This file was deleted.

src/libcollections/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
html_root_url = "http://doc.rust-lang.org/master/",
2020
html_playground_url = "http://play.rust-lang.org/")]
2121

22-
#![feature(macro_rules, managed_boxes, default_type_params, phase, globs)]
22+
#![feature(macro_rules, default_type_params, phase, globs)]
2323
#![feature(unsafe_destructor, import_shadowing)]
2424
#![no_std]
2525

src/libcollections/ringbuf.rs

Lines changed: 0 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,6 @@ impl<T: fmt::Show> fmt::Show for RingBuf<T> {
532532
mod tests {
533533
use std::fmt::Show;
534534
use std::prelude::*;
535-
use std::gc::{GC, Gc};
536535
use std::hash;
537536
use test::Bencher;
538537
use test;
@@ -587,43 +586,6 @@ mod tests {
587586
assert_eq!(*d.get(3), 4);
588587
}
589588

590-
#[test]
591-
#[allow(deprecated)]
592-
fn test_boxes() {
593-
let a: Gc<int> = box(GC) 5;
594-
let b: Gc<int> = box(GC) 72;
595-
let c: Gc<int> = box(GC) 64;
596-
let d: Gc<int> = box(GC) 175;
597-
598-
let mut deq = RingBuf::new();
599-
assert_eq!(deq.len(), 0);
600-
deq.push_front(a);
601-
deq.push_front(b);
602-
deq.push(c);
603-
assert_eq!(deq.len(), 3);
604-
deq.push(d);
605-
assert_eq!(deq.len(), 4);
606-
assert_eq!(deq.front(), Some(&b));
607-
assert_eq!(deq.back(), Some(&d));
608-
assert_eq!(deq.pop_front(), Some(b));
609-
assert_eq!(deq.pop(), Some(d));
610-
assert_eq!(deq.pop(), Some(c));
611-
assert_eq!(deq.pop(), Some(a));
612-
assert_eq!(deq.len(), 0);
613-
deq.push(c);
614-
assert_eq!(deq.len(), 1);
615-
deq.push_front(b);
616-
assert_eq!(deq.len(), 2);
617-
deq.push(d);
618-
assert_eq!(deq.len(), 3);
619-
deq.push_front(a);
620-
assert_eq!(deq.len(), 4);
621-
assert_eq!(*deq.get(0), a);
622-
assert_eq!(*deq.get(1), b);
623-
assert_eq!(*deq.get(2), c);
624-
assert_eq!(*deq.get(3), d);
625-
}
626-
627589
#[cfg(test)]
628590
fn test_parameterized<T:Clone + PartialEq + Show>(a: T, b: T, c: T, d: T) {
629591
let mut deq = RingBuf::new();
@@ -755,12 +717,6 @@ mod tests {
755717
test_parameterized::<int>(5, 72, 64, 175);
756718
}
757719

758-
#[test]
759-
fn test_param_at_int() {
760-
test_parameterized::<Gc<int>>(box(GC) 5, box(GC) 72,
761-
box(GC) 64, box(GC) 175);
762-
}
763-
764720
#[test]
765721
fn test_param_taggy() {
766722
test_parameterized::<Taggy>(One(1), Two(1, 2), Three(1, 2, 3), Two(17, 42));

src/libcore/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
html_playground_url = "http://play.rust-lang.org/")]
5858

5959
#![no_std]
60-
#![feature(globs, intrinsics, lang_items, macro_rules, managed_boxes, phase)]
60+
#![feature(globs, intrinsics, lang_items, macro_rules, phase)]
6161
#![feature(simd, unsafe_destructor)]
6262
#![deny(missing_doc)]
6363

0 commit comments

Comments
 (0)