Skip to content

Commit 27f0624

Browse files
committed
---
yaml --- r: 5555 b: refs/heads/master c: 7550017 h: refs/heads/master i: 5553: 73b9103 5551: a2a0aaa v: v3
1 parent 2f84548 commit 27f0624

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
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: 99cbea51a1df1ef78535654b0d8e674bce25753d
2+
refs/heads/master: 755001725aee4c220258402f246714057be0648a

trunk/src/comp/middle/kind.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,10 @@ fn check_expr(tcx: ty::ctxt, e: @ast::expr) {
170170
need_shared_lhs_rhs(tcx, a, b, "=");
171171
check_copy(tcx, b);
172172
}
173-
ast::expr_assign_op(_, a, b) { need_shared_lhs_rhs(tcx, a, b, "op="); }
173+
ast::expr_assign_op(_, a, b) {
174+
need_shared_lhs_rhs(tcx, a, b, "op=");
175+
check_copy(tcx, b);
176+
}
174177
ast::expr_swap(a, b) { need_shared_lhs_rhs(tcx, a, b, "<->"); }
175178
ast::expr_copy(a) {
176179
need_expr_kind(tcx, a, ast::kind_shared, "'copy' operand");
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// error-pattern: mismatched kind
2+
3+
resource r(b: bool) {
4+
}
5+
6+
fn main() {
7+
let i = [r(true)];
8+
i += [r(true)];
9+
}

0 commit comments

Comments
 (0)