@@ -25,12 +25,12 @@ use rustc::hir::{self, CodegenFnAttrs, CodegenFnAttrFlags};
2525use std:: ffi:: { CStr , CString } ;
2626
2727pub fn const_alloc_to_llvm ( cx : & CodegenCx < ' ll , ' _ > , alloc : & Allocation ) -> & ' ll Value {
28- let mut llvals = Vec :: with_capacity ( alloc. relocations . len ( ) + 1 ) ;
28+ let mut llvals = Vec :: with_capacity ( alloc. relocations ( ) . len ( ) + 1 ) ;
2929 let dl = cx. data_layout ( ) ;
3030 let pointer_size = dl. pointer_size . bytes ( ) as usize ;
3131
3232 let mut next_offset = 0 ;
33- for & ( offset, ( ( ) , alloc_id) ) in alloc. relocations . iter ( ) {
33+ for & ( offset, ( ( ) , alloc_id) ) in alloc. relocations ( ) . iter ( ) {
3434 let offset = offset. bytes ( ) ;
3535 assert_eq ! ( offset as usize as u64 , offset) ;
3636 let offset = offset as usize ;
@@ -455,7 +455,7 @@ impl StaticMethods for CodegenCx<'ll, 'tcx> {
455455 //
456456 // We could remove this hack whenever we decide to drop macOS 10.10 support.
457457 if self . tcx . sess . target . target . options . is_like_osx {
458- assert_eq ! ( alloc. relocations. len( ) , 0 ) ;
458+ assert_eq ! ( alloc. relocations( ) . len( ) , 0 ) ;
459459
460460 let is_zeroed = {
461461 // Treats undefined bytes as if they were defined with the byte value that
@@ -490,7 +490,7 @@ impl StaticMethods for CodegenCx<'ll, 'tcx> {
490490 section. as_str ( ) . as_ptr ( ) as * const _ ,
491491 section. as_str ( ) . len ( ) as c_uint ,
492492 ) ;
493- assert ! ( alloc. relocations. is_empty( ) ) ;
493+ assert ! ( alloc. relocations( ) . is_empty( ) ) ;
494494
495495 // The `inspect` method is okay here because we checked relocations, and
496496 // because we are doing this access to inspect the final interpreter state (not
0 commit comments