File tree 2 files changed +6
-6
lines changed
2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -761,7 +761,7 @@ pub fn default_configuration(sess: &Session) -> CrateConfig {
761
761
}
762
762
}
763
763
ret. insert ( ( sym:: target_arch, Some ( Symbol :: intern ( arch) ) ) ) ;
764
- ret. insert ( ( sym:: target_endian, Some ( Symbol :: intern ( end. name ( ) ) ) ) ) ;
764
+ ret. insert ( ( sym:: target_endian, Some ( Symbol :: intern ( end. as_str ( ) ) ) ) ) ;
765
765
ret. insert ( ( sym:: target_pointer_width, Some ( Symbol :: intern ( & wordsz) ) ) ) ;
766
766
ret. insert ( ( sym:: target_env, Some ( Symbol :: intern ( env) ) ) ) ;
767
767
ret. insert ( ( sym:: target_vendor, Some ( Symbol :: intern ( vendor) ) ) ) ;
Original file line number Diff line number Diff line change @@ -159,8 +159,8 @@ impl TargetDataLayout {
159
159
return Err ( format ! (
160
160
"inconsistent target specification: \" data-layout\" claims \
161
161
architecture is {}-endian, while \" target-endian\" is `{}`",
162
- dl. endian. name ( ) ,
163
- target. target_endian. name ( )
162
+ dl. endian. as_str ( ) ,
163
+ target. target_endian. as_str ( )
164
164
) ) ;
165
165
}
166
166
@@ -235,7 +235,7 @@ pub enum Endian {
235
235
}
236
236
237
237
impl Endian {
238
- pub fn name ( & self ) -> & str {
238
+ pub fn as_str ( & self ) -> & str {
239
239
match self {
240
240
Self :: Little => "little" ,
241
241
Self :: Big => "big" ,
@@ -253,7 +253,7 @@ impl Endian {
253
253
254
254
impl fmt:: Debug for Endian {
255
255
fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
256
- f. write_str ( self . name ( ) )
256
+ f. write_str ( self . as_str ( ) )
257
257
}
258
258
}
259
259
@@ -271,7 +271,7 @@ impl FromStr for Endian {
271
271
272
272
impl ToJson for Endian {
273
273
fn to_json ( & self ) -> Json {
274
- Json :: String ( self . name ( ) . to_owned ( ) )
274
+ Json :: String ( self . as_str ( ) . to_owned ( ) )
275
275
}
276
276
}
277
277
You can’t perform that action at this time.
0 commit comments