@@ -12,7 +12,7 @@ use rustc_target::spec::{LinkerFlavor, MergeFunctions, PanicStrategy, RelroLevel
12
12
use rustc_target:: spec:: { Target , TargetTriple } ;
13
13
14
14
use syntax;
15
- use syntax:: ast:: { self , IntTy , UintTy } ;
15
+ use syntax:: ast;
16
16
use syntax:: source_map:: { FileName , FilePathMapping } ;
17
17
use syntax:: edition:: { Edition , EDITION_NAME_LIST , DEFAULT_EDITION } ;
18
18
use syntax:: symbol:: { sym, Symbol } ;
@@ -36,8 +36,7 @@ use std::path::{Path, PathBuf};
36
36
37
37
pub struct Config {
38
38
pub target : Target ,
39
- pub isize_ty : IntTy ,
40
- pub usize_ty : UintTy ,
39
+ pub ptr_width : u32 ,
41
40
}
42
41
43
42
#[ derive( Clone , Hash , Debug ) ]
@@ -1570,10 +1569,10 @@ pub fn build_target_config(opts: &Options, sp: &Handler) -> Config {
1570
1569
FatalError . raise ( ) ;
1571
1570
} ) ;
1572
1571
1573
- let ( isize_ty , usize_ty ) = match & target. target_pointer_width [ ..] {
1574
- "16" => ( ast :: IntTy :: I16 , ast :: UintTy :: U16 ) ,
1575
- "32" => ( ast :: IntTy :: I32 , ast :: UintTy :: U32 ) ,
1576
- "64" => ( ast :: IntTy :: I64 , ast :: UintTy :: U64 ) ,
1572
+ let ptr_width = match & target. target_pointer_width [ ..] {
1573
+ "16" => 16 ,
1574
+ "32" => 32 ,
1575
+ "64" => 64 ,
1577
1576
w => sp. fatal ( & format ! (
1578
1577
"target specification was invalid: \
1579
1578
unrecognized target-pointer-width {}",
@@ -1583,8 +1582,7 @@ pub fn build_target_config(opts: &Options, sp: &Handler) -> Config {
1583
1582
1584
1583
Config {
1585
1584
target,
1586
- isize_ty,
1587
- usize_ty,
1585
+ ptr_width,
1588
1586
}
1589
1587
}
1590
1588
0 commit comments