@@ -368,7 +368,7 @@ pub struct BindgenContext {
368
368
translation_unit : clang:: TranslationUnit ,
369
369
370
370
/// Target information that can be useful for some stuff.
371
- target_info : Option < clang:: TargetInfo > ,
371
+ target_info : clang:: TargetInfo ,
372
372
373
373
/// The options given by the user via cli or other medium.
374
374
options : BindgenOptions ,
@@ -583,16 +583,14 @@ If you encounter an error missing from this list, please file an issue or a PR!"
583
583
584
584
#[ cfg( debug_assertions) ]
585
585
{
586
- if let Some ( ref ti) = target_info {
587
- if effective_target == HOST_TARGET {
588
- assert_eq ! (
589
- ti. pointer_width / 8 ,
590
- mem:: size_of:: <* mut ( ) >( ) ,
591
- "{:?} {:?}" ,
592
- effective_target,
593
- HOST_TARGET
594
- ) ;
595
- }
586
+ if effective_target == HOST_TARGET {
587
+ assert_eq ! (
588
+ target_info. pointer_width / 8 ,
589
+ mem:: size_of:: <* mut ( ) >( ) ,
590
+ "{:?} {:?}" ,
591
+ effective_target,
592
+ HOST_TARGET
593
+ ) ;
596
594
}
597
595
}
598
596
@@ -645,10 +643,7 @@ If you encounter an error missing from this list, please file an issue or a PR!"
645
643
/// Returns the pointer width to use for the target for the current
646
644
/// translation.
647
645
pub fn target_pointer_size ( & self ) -> usize {
648
- if let Some ( ref ti) = self . target_info {
649
- return ti. pointer_width / 8 ;
650
- }
651
- mem:: size_of :: < * mut ( ) > ( )
646
+ return self . target_info . pointer_width / 8 ;
652
647
}
653
648
654
649
/// Get the stack of partially parsed types that we are in the middle of
0 commit comments