@@ -576,7 +576,7 @@ fn trans_rvalue_dps_unadjusted(bcx: block, expr: @ast::expr,
576
576
} ;
577
577
}
578
578
ast:: expr_struct( _, ref fields, base) => {
579
- return trans_rec_or_struct ( bcx, ( * fields) , base, expr. id , dest) ;
579
+ return trans_rec_or_struct ( bcx, ( * fields) , base, expr. span , expr . id , dest) ;
580
580
}
581
581
ast:: expr_tup( ref args) => {
582
582
let repr = adt:: represent_type ( bcx. ccx ( ) , expr_ty ( bcx, expr) ) ;
@@ -721,7 +721,7 @@ fn trans_def_dps_unadjusted(bcx: block, ref_expr: @ast::expr,
721
721
}
722
722
ast:: def_struct( * ) => {
723
723
// Nothing to do here.
724
- // XXX : May not be true in the case of classes with destructors.
724
+ // FIXME #6572 : May not be true in the case of classes with destructors.
725
725
return bcx;
726
726
}
727
727
_ => {
@@ -1129,6 +1129,7 @@ pub fn with_field_tys<R>(tcx: ty::ctxt,
1129
1129
fn trans_rec_or_struct ( bcx : block ,
1130
1130
fields : & [ ast:: field ] ,
1131
1131
base : Option < @ast:: expr > ,
1132
+ expr_span : codemap:: span ,
1132
1133
id : ast:: node_id ,
1133
1134
dest : Dest ) -> block
1134
1135
{
@@ -1167,8 +1168,7 @@ fn trans_rec_or_struct(bcx: block,
1167
1168
}
1168
1169
None => {
1169
1170
if need_base. any ( |b| * b) {
1170
- // XXX should be span bug
1171
- tcx. sess . bug ( ~"missing fields and no base expr")
1171
+ tcx. sess . span_bug ( expr_span, ~"missing fields and no base expr")
1172
1172
}
1173
1173
None
1174
1174
}
@@ -1232,8 +1232,8 @@ fn trans_adt(bcx: block, repr: &adt::Repr, discr: int,
1232
1232
temp_cleanups. push ( dest) ;
1233
1233
}
1234
1234
for optbase. each |base| {
1235
- // XXX is it sound to use the destination's repr on the base?
1236
- // XXX would it ever be reasonable to be here with discr != 0?
1235
+ // FIXME #6573: is it sound to use the destination's repr on the base?
1236
+ // And, would it ever be reasonable to be here with discr != 0?
1237
1237
let base_datum = unpack_datum ! ( bcx, trans_to_datum( bcx, base. expr) ) ;
1238
1238
for base. fields. each |& ( i, t) | {
1239
1239
let datum = do base_datum. get_element ( bcx, t, ZeroMem ) |srcval| {
0 commit comments