Add syntax and representation for return-by-mutably-rooted-ref
This will be used in the near future to decide what can safely be done with the returned reference. Issue #918
This commit is contained in:
parent
1cabe37155
commit
93de2f0b74
11 changed files with 55 additions and 34 deletions
|
@ -445,7 +445,7 @@ fn parse_ret_ty(p: parser) -> (ast::ret_style, @ast::ty) {
|
|||
} else {
|
||||
let style = ast::return_val;
|
||||
if eat(p, token::BINOP(token::AND)) {
|
||||
style = ast::return_ref;
|
||||
style = ast::return_ref(eat(p, token::NOT));
|
||||
};
|
||||
(style, parse_ty(p, false))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue