File tree Expand file tree Collapse file tree 4 files changed +24
-2
lines changed Expand file tree Collapse file tree 4 files changed +24
-2
lines changed Original file line number Diff line number Diff line change 1
1
---
2
- refs/heads/master: ac2b0456f4273474c2c2ef39a85ac2ee3be28682
2
+ refs/heads/master: 3f78e0ecc03b9e0c7b46c64a4be69343c6a8888a
3
3
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4
4
refs/heads/snap-stage3: eb8fd119c65c67f3b1b8268cc7341c22d39b7b61
5
5
refs/heads/try: d324a424d8f84b1eb049b12cf34182bda91b0024
Original file line number Diff line number Diff line change @@ -4454,11 +4454,17 @@ impl Resolver {
4454
4454
let class_def = def_class( class_id) ;
4455
4455
self . record_def( pattern. id, class_def) ;
4456
4456
}
4457
+ Some ( definition @ def_class( class_id) )
4458
+ if self . structs. contains_key( class_id) => {
4459
+ self . record_def( pattern. id, definition) ;
4460
+ }
4457
4461
Some ( definition @ def_variant( _, variant_id) )
4458
4462
if self . structs. contains_key( variant_id) => {
4459
4463
self . record_def( pattern. id, definition) ;
4460
4464
}
4461
- _ => {
4465
+ result => {
4466
+ debug!( "( resolving pattern) didn' t find struct \
4467
+ def: %?", result) ;
4462
4468
self . session. span_err(
4463
4469
path. span,
4464
4470
fmt!( "`%s` does not name a structure",
Original file line number Diff line number Diff line change
1
+ #[ crate_type="lib" ] ;
2
+
3
+ pub struct S {
4
+ x : int ,
5
+ y : int
6
+ }
7
+
Original file line number Diff line number Diff line change
1
+ // xfail-fast
2
+ extern mod struct_destructuring_cross_crate;
3
+
4
+ fn main ( ) {
5
+ let x = struct_destructuring_cross_crate:: S { x : 1 , y : 2 } ;
6
+ let struct_destructuring_cross_crate:: S { x : a, y : b } = x;
7
+ assert a == 1 ;
8
+ assert b == 2 ;
9
+ }
You can’t perform that action at this time.
0 commit comments