Skip to content

Commit 38fd96b

Browse files
committed
---
yaml --- r: 1698 b: refs/heads/master c: 8b82a54 h: refs/heads/master v: v3
1 parent 91dd6bf commit 38fd96b

File tree

3 files changed

+18
-1
lines changed

3 files changed

+18
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: 8aa946ff5e312543a4e3903ee0d3580fbd8d2887
2+
refs/heads/master: 8b82a549bf89f101efc19638357d360a968b1348

trunk/src/comp/driver/session.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,14 @@ obj session(cfg targ) {
4040
fail;
4141
}
4242

43+
fn span_warn(span sp, str msg) {
44+
log #fmt("%s:%u:%u:%u:%u: warning: %s",
45+
sp.filename,
46+
sp.lo.line, sp.lo.col,
47+
sp.hi.line, sp.hi.col,
48+
msg);
49+
}
50+
4351
fn bug(str msg) {
4452
log #fmt("error: internal compiler error %s", msg);
4553
fail;

trunk/src/comp/front/parser.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -452,6 +452,15 @@ impure fn parse_ty(parser p) -> @ast.ty {
452452
t = ast.ty_path(parse_path(p, GREEDY), none[ast.def]);
453453
}
454454

455+
case (token.MUTABLE) {
456+
p.bump();
457+
p.get_session().span_warn(p.get_span(),
458+
"ignoring deprecated 'mutable' type constructor");
459+
auto typ = parse_ty(p);
460+
t = typ.node;
461+
hi = typ.span;
462+
}
463+
455464
case (_) {
456465
p.err("expecting type");
457466
t = ast.ty_nil;

0 commit comments

Comments
 (0)