Skip to content

Commit 92b67ba

Browse files
committed
---
yaml --- r: 971 b: refs/heads/master c: 20b11c8 h: refs/heads/master i: 969: eadc5a9 967: 03ee295 v: v3
1 parent 40ef1bf commit 92b67ba

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
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: 7be7c23b6b5ead25529814ccdbc0101d6b6d7683
2+
refs/heads/master: 20b11c832cee3f4ed7a7abaa0284c40d32dbd262

trunk/src/comp/middle/typeck.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ type arg = rec(ast.mode mode, @ty ty);
2828

2929
// NB: If you change this, you'll probably want to change the corresponding
3030
// AST structure in front/ast.rs as well.
31-
type ty = rec(sty struct, option.t[str] cname);
31+
type ty = rec(sty struct, bool mut, option.t[str] cname);
3232
tag sty {
3333
ty_nil;
3434
ty_bool;
@@ -257,7 +257,7 @@ fn ast_ty_to_ty(ty_getter getter, &@ast.ty ast_ty) -> @ty {
257257
}
258258
}
259259

260-
ret @rec(struct=sty, cname=cname);
260+
ret @rec(struct=sty, mut=false, cname=cname);
261261
}
262262

263263
// A convenience function to use a crate_ctxt to resolve names for
@@ -522,7 +522,7 @@ fn type_is_signed(@ty t) -> bool {
522522
}
523523

524524
fn plain_ty(&sty st) -> @ty {
525-
ret @rec(struct=st, cname=none[str]);
525+
ret @rec(struct=st, mut=false, cname=none[str]);
526526
}
527527

528528
fn ann_to_type(&ast.ann ann) -> @ty {
@@ -1075,7 +1075,7 @@ fn check_expr(&fn_ctxt fcx, @ast.expr expr) -> @ast.expr {
10751075
}
10761076

10771077
case (ast.expr_name(?name, ?defopt, _)) {
1078-
auto t = @rec(struct=ty_nil, cname=none[str]);
1078+
auto t = plain_ty(ty_nil);
10791079
alt (option.get[ast.def](defopt)) {
10801080
case (ast.def_arg(?id)) {
10811081
check (fcx.locals.contains_key(id));

0 commit comments

Comments
 (0)