File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 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 {
761761 }
762762 }
763763 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 ( ) ) ) ) ) ;
765765 ret. insert ( ( sym:: target_pointer_width, Some ( Symbol :: intern ( & wordsz) ) ) ) ;
766766 ret. insert ( ( sym:: target_env, Some ( Symbol :: intern ( env) ) ) ) ;
767767 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 {
159159 return Err ( format ! (
160160 "inconsistent target specification: \" data-layout\" claims \
161161 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 ( )
164164 ) ) ;
165165 }
166166
@@ -235,7 +235,7 @@ pub enum Endian {
235235}
236236
237237impl Endian {
238- pub fn name ( & self ) -> & str {
238+ pub fn as_str ( & self ) -> & str {
239239 match self {
240240 Self :: Little => "little" ,
241241 Self :: Big => "big" ,
@@ -253,7 +253,7 @@ impl Endian {
253253
254254impl fmt:: Debug for Endian {
255255 fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
256- f. write_str ( self . name ( ) )
256+ f. write_str ( self . as_str ( ) )
257257 }
258258}
259259
@@ -271,7 +271,7 @@ impl FromStr for Endian {
271271
272272impl ToJson for Endian {
273273 fn to_json ( & self ) -> Json {
274- Json :: String ( self . name ( ) . to_owned ( ) )
274+ Json :: String ( self . as_str ( ) . to_owned ( ) )
275275 }
276276}
277277
You can’t perform that action at this time.
0 commit comments