Skip to content

Commit f464930

Browse files
committed
---
yaml --- r: 37047 b: refs/heads/try2 c: 16ec9aa h: refs/heads/master i: 37045: d69f2e8 37043: 46ef68c 37039: 4c7052d v: v3
1 parent 074253b commit f464930

File tree

3 files changed

+15
-4
lines changed

3 files changed

+15
-4
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: eb8fd119c65c67f3b1b8268cc7341c22d39b7b61
55
refs/heads/try: d324a424d8f84b1eb049b12cf34182bda91b0024
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: 4557f70487e10c1f4e304f4bb853dbab444359dc
8+
refs/heads/try2: 16ec9aa6e7b999e235007f75af2fd631f7333a84
99
refs/heads/incoming: d9317a174e434d4c99fc1a37fd7dc0d2f5328d37
1010
refs/heads/dist-snap: 22efa39382d41b084fde1719df7ae8ce5697d8c9
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596

branches/try2/src/librustc/middle/typeck/check/mod.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1679,9 +1679,11 @@ fn check_expr_with_unifier(fcx: @fn_ctxt,
16791679
let expected_field_type =
16801680
ty::lookup_field_type(
16811681
tcx, class_id, field_id, substitutions);
1682-
bot |= check_expr(fcx,
1683-
field.node.expr,
1684-
Some(expected_field_type));
1682+
bot |=
1683+
check_expr_with_assignability(
1684+
fcx,
1685+
field.node.expr,
1686+
expected_field_type);
16851687
class_field_map.insert(
16861688
field.node.ident, (field_id, true));
16871689
fields_found += 1;
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
struct Foo {
2+
x: &int
3+
}
4+
5+
fn main() {
6+
let f = Foo { x: @3 };
7+
assert *f.x == 3;
8+
}
9+

0 commit comments

Comments
 (0)