rustc: Add a type annotation for locals
This commit is contained in:
parent
0578978495
commit
e02ffb2c2d
@ -80,7 +80,8 @@ type local = rec(option.t[@ty] ty,
|
||||
bool infer,
|
||||
ident ident,
|
||||
option.t[@expr] init,
|
||||
def_id id);
|
||||
def_id id,
|
||||
ann ann);
|
||||
|
||||
type decl = spanned[decl_];
|
||||
tag decl_ {
|
||||
|
@ -731,7 +731,8 @@ impure fn parse_let(parser p) -> @ast.decl {
|
||||
infer = false,
|
||||
ident = ident,
|
||||
init = init,
|
||||
id = p.next_def_id());
|
||||
id = p.next_def_id(),
|
||||
ann = ast.ann_none);
|
||||
|
||||
ret @spanned(lo, hi, ast.decl_local(@local));
|
||||
}
|
||||
@ -750,7 +751,8 @@ impure fn parse_auto(parser p) -> @ast.decl {
|
||||
infer = true,
|
||||
ident = ident,
|
||||
init = init,
|
||||
id = p.next_def_id());
|
||||
id = p.next_def_id(),
|
||||
ann = ast.ann_none);
|
||||
|
||||
ret @spanned(lo, hi, ast.decl_local(@local));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user