]> git.lizzy.rs Git - rust.git/commitdiff
rollup merge of #20706: nikomatsakis/assoc-types-projections-in-structs-issue-20470
authorAlex Crichton <alex@alexcrichton.com>
Thu, 8 Jan 2015 01:35:00 +0000 (17:35 -0800)
committerAlex Crichton <alex@alexcrichton.com>
Thu, 8 Jan 2015 01:35:00 +0000 (17:35 -0800)
Conflicts:
src/librustc_trans/trans/expr.rs

1  2 
src/librustc/middle/traits/select.rs
src/librustc/middle/ty.rs
src/librustc/middle/ty_fold.rs
src/librustc_trans/trans/adt.rs
src/librustc_trans/trans/common.rs
src/librustc_trans/trans/expr.rs
src/librustc_trans/trans/monomorphize.rs
src/librustc_typeck/astconv.rs
src/librustc_typeck/check/mod.rs

Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index 2d1a151c2b839e8960cc7734675e115a87eddb01,21b400a710f083cdee3b5b3b844219d66672aabb..0e7dd42d3207dd52397e9c349785ba1769890290
@@@ -1318,7 -1319,9 +1319,9 @@@ pub fn with_field_tys<'tcx, R, F>(tcx: 
  {
      match ty.sty {
          ty::ty_struct(did, substs) => {
-             op(0, &struct_fields(tcx, did, substs)[])
+             let fields = struct_fields(tcx, did, substs);
+             let fields = monomorphize::normalize_associated_type(tcx, &fields);
 -            op(0, fields.index(&FullRange))
++            op(0, &fields[])
          }
  
          ty::ty_tup(ref v) => {
                          def::DefVariant(enum_id, variant_id, _) => {
                              let variant_info = ty::enum_variant_with_id(
                                  tcx, enum_id, variant_id);
-                             op(variant_info.disr_val,
-                                &struct_fields(tcx,
-                                              variant_id,
-                                              substs)[])
+                             let fields = struct_fields(tcx, variant_id, substs);
+                             let fields = monomorphize::normalize_associated_type(tcx, &fields);
 -                            op(variant_info.disr_val, fields.index(&FullRange))
++                            op(variant_info.disr_val, &fields.index[])
                          }
                          _ => {
                              tcx.sess.bug("resolve didn't map this expr to a \
Simple merge
Simple merge