Skip to content

Commit 4e39193

Browse files
committed
---
yaml --- r: 5556 b: refs/heads/master c: 3778b6c h: refs/heads/master v: v3
1 parent 94a77f2 commit 4e39193

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: 755001725aee4c220258402f246714057be0648a
2+
refs/heads/master: 3778b6c6a80a5ebced4782f1e4462ff82471847b

trunk/src/comp/middle/kind.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,7 @@ fn check_expr(tcx: ty::ctxt, e: @ast::expr) {
177177
ast::expr_swap(a, b) { need_shared_lhs_rhs(tcx, a, b, "<->"); }
178178
ast::expr_copy(a) {
179179
need_expr_kind(tcx, a, ast::kind_shared, "'copy' operand");
180+
check_copy(tcx, a);
180181
}
181182
ast::expr_ret(option::some(a)) {
182183
need_expr_kind(tcx, a, ast::kind_shared, "'ret' operand");
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// error-pattern: mismatched kind
2+
3+
resource r(b: bool) {
4+
}
5+
6+
fn main() {
7+
let i = [r(true)];
8+
let j;
9+
j <- copy [r(true)];
10+
}

0 commit comments

Comments
 (0)