parent
5eea7d6e61
commit
80d129aa45
2 changed files with 13 additions and 1 deletions
|
@ -1234,7 +1234,12 @@ fn print_expr(s: ps, &&expr: @ast::expr) {
|
||||||
print_block(s, blk);
|
print_block(s, blk);
|
||||||
}
|
}
|
||||||
ast::expr_copy(e) => { word_space(s, ~"copy"); print_expr(s, e); }
|
ast::expr_copy(e) => { word_space(s, ~"copy"); print_expr(s, e); }
|
||||||
ast::expr_unary_move(e) => { word_space(s, ~"move"); print_expr(s, e); }
|
ast::expr_unary_move(e) => {
|
||||||
|
popen(s);
|
||||||
|
word_space(s, ~"move");
|
||||||
|
print_expr(s, e);
|
||||||
|
pclose(s);
|
||||||
|
}
|
||||||
ast::expr_move(lhs, rhs) => {
|
ast::expr_move(lhs, rhs) => {
|
||||||
print_expr(s, lhs);
|
print_expr(s, lhs);
|
||||||
space(s.s);
|
space(s.s);
|
||||||
|
|
7
src/test/run-pass/issue-3220.rs
Normal file
7
src/test/run-pass/issue-3220.rs
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
struct thing { x: int; new () { self.x = 0; } drop { } }
|
||||||
|
impl thing { fn f(self) {} }
|
||||||
|
|
||||||
|
fn main() {
|
||||||
|
let z = thing();
|
||||||
|
(move z).f();
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue