Skip to content

Commit cad1f89

Browse files
committed
auto merge of #10608 : thestinger/rust/managed, r=huonw
2 parents a9b1dcf + 7d9fd62 commit cad1f89

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

doc/tutorial.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1320,7 +1320,8 @@ let z = x; // this moves `x` into `z`, rather than creating a new owner
13201320

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

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

src/librustc/front/feature_gate.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -141,11 +141,9 @@ impl Visitor<()> for Context {
141141
},
142142
ast::ty_box(_) => {
143143
self.gate_feature("managed_boxes", t.span,
144-
"The managed box syntax will be replaced \
145-
by a library type, and a garbage \
146-
collector is not yet implemented. \
147-
Consider using the `std::rc::Rc` type \
148-
for reference counted pointers.");
144+
"The managed box syntax is being replaced by the `std::gc::Gc`
145+
and `std::rc::Rc` types. Equivalent functionality to managed
146+
trait objects will be implemented but is currently missing.");
149147
}
150148
_ => {}
151149
}

0 commit comments

Comments
 (0)