Make moves explicit in doc examples
Had to remove the buffalo example. It was awkward to update for explicit moves.
This commit is contained in:
parent
d0ed13c4bd
commit
ea5e3d21ff
4 changed files with 28 additions and 10 deletions
13
src/test/run-pass/issue-3668.rs
Normal file
13
src/test/run-pass/issue-3668.rs
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
struct P { child: Option<@mut P> }
|
||||
trait PTrait {
|
||||
fn getChildOption() -> Option<@P>;
|
||||
}
|
||||
|
||||
impl P: PTrait {
|
||||
fn getChildOption() -> Option<@P> {
|
||||
const childVal: @P = self.child.get();
|
||||
fail;
|
||||
}
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
5
src/test/run-pass/issue-3688-2.rs
Normal file
5
src/test/run-pass/issue-3688-2.rs
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
fn f(x:int) {
|
||||
const child: int = x + 1;
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
Loading…
Add table
Add a link
Reference in a new issue