diff options
| author | Patrick Walton <[email protected]> | 2011-03-18 13:44:13 -0700 |
|---|---|---|
| committer | Patrick Walton <[email protected]> | 2011-03-18 13:44:54 -0700 |
| commit | 8b82a549bf89f101efc19638357d360a968b1348 (patch) | |
| tree | 57b35532aabcae949dbd6af1018e42e7ba5f608f /src/comp/front | |
| parent | Make some standard library pieces no longer dependent on mutable parameters, ... (diff) | |
| download | rust-8b82a549bf89f101efc19638357d360a968b1348.tar.xz rust-8b82a549bf89f101efc19638357d360a968b1348.zip | |
rustc: When encountering "mutable" as a tycon, parse it, drop it on the floor, and emit a warning
Diffstat (limited to 'src/comp/front')
| -rw-r--r-- | src/comp/front/parser.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/comp/front/parser.rs b/src/comp/front/parser.rs index 028b8a31..b00a2deb 100644 --- a/src/comp/front/parser.rs +++ b/src/comp/front/parser.rs @@ -452,6 +452,15 @@ impure fn parse_ty(parser p) -> @ast.ty { t = ast.ty_path(parse_path(p, GREEDY), none[ast.def]); } + case (token.MUTABLE) { + p.bump(); + p.get_session().span_warn(p.get_span(), + "ignoring deprecated 'mutable' type constructor"); + auto typ = parse_ty(p); + t = typ.node; + hi = typ.span; + } + case (_) { p.err("expecting type"); t = ast.ty_nil; |