Skip to content

Commit fbca3a8

Browse files
committed
---
yaml --- r: 89983 b: refs/heads/master c: 6cbc57c h: refs/heads/master i: 89981: 195b060 89979: 5b8685a 89975: 8f14b78 89967: 2932a21 89951: 77915df 89919: e412fa8 89855: 6b1ca93 v: v3
1 parent 5222e12 commit fbca3a8

20 files changed

+657
-409
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 09af9d48561380f8de3aa9a8b15b2b4e9af4daef
2+
refs/heads/master: 6cbc57cadbf8dfb2053893c917fb89ccbca0f253
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: a6d3e57dca68fde4effdda3e4ae2887aa535fcd6
55
refs/heads/try: b160761e35efcd1207112b3b782c06633cf441a8

trunk/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

trunk/src/librustc/front/feature_gate.rs

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ use syntax::attr::AttrMetaMethods;
2323
use syntax::codemap::Span;
2424
use syntax::visit;
2525
use syntax::visit::Visitor;
26+
use syntax::parse::token;
2627

2728
use driver::session::Session;
2829

@@ -36,6 +37,7 @@ static KNOWN_FEATURES: &'static [(&'static str, Status)] = &[
3637
("once_fns", Active),
3738
("asm", Active),
3839
("managed_boxes", Active),
40+
("non_ascii_idents", Active),
3941

4042
// These are used to test this portion of the compiler, they don't actually
4143
// mean anything
@@ -76,6 +78,15 @@ impl Context {
7678
}
7779

7880
impl Visitor<()> for Context {
81+
fn visit_ident(&mut self, sp: Span, id: ast::Ident, _: ()) {
82+
let s = token::ident_to_str(&id);
83+
84+
if !s.is_ascii() {
85+
self.gate_feature("non_ascii_idents", sp,
86+
"non-ascii idents are not fully supported.");
87+
}
88+
}
89+
7990
fn visit_view_item(&mut self, i: &ast::view_item, _: ()) {
8091
match i.node {
8192
ast::view_item_use(ref paths) => {
@@ -141,11 +152,9 @@ impl Visitor<()> for Context {
141152
},
142153
ast::ty_box(_) => {
143154
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.");
155+
"The managed box syntax is being replaced by the `std::gc::Gc`
156+
and `std::rc::Rc` types. Equivalent functionality to managed
157+
trait objects will be implemented but is currently missing.");
149158
}
150159
_ => {}
151160
}

0 commit comments

Comments
 (0)