Skip to content

mention Gc in the managed box feature gate #10608

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 22, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion doc/tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -1320,7 +1320,8 @@ let z = x; // this moves `x` into `z`, rather than creating a new owner

assert_eq!(*z.borrow(), [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]);

let mut a = Rc::new([10, 9, 8, 7, 6, 5, 4, 3, 2, 1]); // the variable is mutable, but not the box
// the variable is mutable, but not the contents of the box
let mut a = Rc::new([10, 9, 8, 7, 6, 5, 4, 3, 2, 1]);
a = z;
~~~

Expand Down
8 changes: 3 additions & 5 deletions src/librustc/front/feature_gate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,11 +141,9 @@ impl Visitor<()> for Context {
},
ast::ty_box(_) => {
self.gate_feature("managed_boxes", t.span,
"The managed box syntax will be replaced \
by a library type, and a garbage \
collector is not yet implemented. \
Consider using the `std::rc::Rc` type \
for reference counted pointers.");
"The managed box syntax is being replaced by the `std::gc::Gc`
and `std::rc::Rc` types. Equivalent functionality to managed
trait objects will be implemented but is currently missing.");
}
_ => {}
}
Expand Down