@@ -25,12 +25,12 @@ use rustc::hir::{self, CodegenFnAttrs, CodegenFnAttrFlags};
25
25
use std:: ffi:: { CStr , CString } ;
26
26
27
27
pub 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 ) ;
29
29
let dl = cx. data_layout ( ) ;
30
30
let pointer_size = dl. pointer_size . bytes ( ) as usize ;
31
31
32
32
let mut next_offset = 0 ;
33
- for & ( offset, ( ( ) , alloc_id) ) in alloc. relocations . iter ( ) {
33
+ for & ( offset, ( ( ) , alloc_id) ) in alloc. relocations ( ) . iter ( ) {
34
34
let offset = offset. bytes ( ) ;
35
35
assert_eq ! ( offset as usize as u64 , offset) ;
36
36
let offset = offset as usize ;
@@ -455,7 +455,7 @@ impl StaticMethods for CodegenCx<'ll, 'tcx> {
455
455
//
456
456
// We could remove this hack whenever we decide to drop macOS 10.10 support.
457
457
if self . tcx . sess . target . target . options . is_like_osx {
458
- assert_eq ! ( alloc. relocations. len( ) , 0 ) ;
458
+ assert_eq ! ( alloc. relocations( ) . len( ) , 0 ) ;
459
459
460
460
let is_zeroed = {
461
461
// Treats undefined bytes as if they were defined with the byte value that
@@ -490,7 +490,7 @@ impl StaticMethods for CodegenCx<'ll, 'tcx> {
490
490
section. as_str ( ) . as_ptr ( ) as * const _ ,
491
491
section. as_str ( ) . len ( ) as c_uint ,
492
492
) ;
493
- assert ! ( alloc. relocations. is_empty( ) ) ;
493
+ assert ! ( alloc. relocations( ) . is_empty( ) ) ;
494
494
495
495
// The `inspect` method is okay here because we checked relocations, and
496
496
// because we are doing this access to inspect the final interpreter state (not
0 commit comments