@@ -195,7 +195,7 @@ pub fn appropriate_mode(ccx: &mut CrateContext, ty: ty::t) -> DatumMode {
195
195
* on whether type is immediate or not.
196
196
*/
197
197
198
- if ty:: type_is_voidish ( ty) {
198
+ if ty:: type_is_voidish ( ccx . tcx , ty) {
199
199
ByValue
200
200
} else if type_is_immediate ( ccx, ty) {
201
201
ByValue
@@ -271,7 +271,7 @@ impl Datum {
271
271
272
272
let _icx = push_ctxt ( "copy_to" ) ;
273
273
274
- if ty:: type_is_voidish ( self . ty ) {
274
+ if ty:: type_is_voidish ( bcx . tcx ( ) , self . ty ) {
275
275
return bcx;
276
276
}
277
277
@@ -343,7 +343,7 @@ impl Datum {
343
343
debug2 ! ( "move_to(self={}, action={:?}, dst={})" ,
344
344
self . to_str( bcx. ccx( ) ) , action, bcx. val_to_str( dst) ) ;
345
345
346
- if ty:: type_is_voidish ( self . ty ) {
346
+ if ty:: type_is_voidish ( bcx . tcx ( ) , self . ty ) {
347
347
return bcx;
348
348
}
349
349
@@ -432,7 +432,7 @@ impl Datum {
432
432
*
433
433
* Yields the value itself. */
434
434
435
- if ty:: type_is_voidish ( self . ty ) {
435
+ if ty:: type_is_voidish ( bcx . tcx ( ) , self . ty ) {
436
436
C_nil ( )
437
437
} else {
438
438
match self . mode {
@@ -469,7 +469,7 @@ impl Datum {
469
469
match self . mode {
470
470
ByRef ( _) => self . val ,
471
471
ByValue => {
472
- if ty:: type_is_voidish ( self . ty ) {
472
+ if ty:: type_is_voidish ( bcx . tcx ( ) , self . ty ) {
473
473
C_null ( type_of:: type_of ( bcx. ccx ( ) , self . ty ) . ptr_to ( ) )
474
474
} else {
475
475
let slot = alloc_ty ( bcx, self . ty , "" ) ;
0 commit comments