diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2014-06-11 19:33:52 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2014-06-14 10:45:37 -0700 |
| commit | ade807c6dcf6dc4454732c5e914ca06ebb429773 (patch) | |
| tree | 64606dac9c81ec4567e19f503d4d82e249dbf40a /src/libsyntax/parse/obsolete.rs | |
| parent | f20b1293fcce4e120bd4a57226e0817271cd672c (diff) | |
| download | rust-ade807c6dcf6dc4454732c5e914ca06ebb429773.tar.gz rust-ade807c6dcf6dc4454732c5e914ca06ebb429773.zip | |
rustc: Obsolete the `@` syntax entirely
This removes all remnants of `@` pointers from rustc. Additionally, this removes the `GC` structure from the prelude as it seems odd exporting an experimental type in the prelude by default. Closes #14193 [breaking-change]
Diffstat (limited to 'src/libsyntax/parse/obsolete.rs')
| -rw-r--r-- | src/libsyntax/parse/obsolete.rs | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/libsyntax/parse/obsolete.rs b/src/libsyntax/parse/obsolete.rs index e280c244929..025684ae71e 100644 --- a/src/libsyntax/parse/obsolete.rs +++ b/src/libsyntax/parse/obsolete.rs @@ -22,7 +22,7 @@ use codemap::{Span, respan}; use parse::parser; use parse::token; -use std::gc::Gc; +use std::gc::{Gc, GC}; /// The specific types of unsupported syntax #[deriving(PartialEq, Eq, Hash)] @@ -31,6 +31,8 @@ pub enum ObsoleteSyntax { ObsoleteOwnedExpr, ObsoleteOwnedPattern, ObsoleteOwnedVector, + ObsoleteManagedType, + ObsoleteManagedExpr, } pub trait ParserObsoleteMethods { @@ -68,6 +70,14 @@ impl<'a> ParserObsoleteMethods for parser::Parser<'a> { "`~[T]` is no longer a type", "use the `Vec` type instead" ), + ObsoleteManagedType => ( + "`@` notation for managed pointers", + "use `Gc<T>` in `std::gc` instead" + ), + ObsoleteManagedExpr => ( + "`@` notation for a managed pointer allocation", + "use the `box(GC)` oeprator instead of `@`" + ), }; self.report(sp, kind, kind_str, desc); |
