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
|
@ -213,6 +213,13 @@ fn ternary_to_if(e: @expr) -> @expr {
|
|||
}
|
||||
}
|
||||
|
||||
fn ret_by_ref(style: ret_style) -> bool {
|
||||
alt style {
|
||||
return_ref(_) { true }
|
||||
_ { false }
|
||||
}
|
||||
}
|
||||
|
||||
// Local Variables:
|
||||
// mode: rust
|
||||
// fill-column: 78;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue