File tree Expand file tree Collapse file tree 2 files changed +1
-19
lines changed Expand file tree Collapse file tree 2 files changed +1
-19
lines changed Original file line number Diff line number Diff line change @@ -58,10 +58,6 @@ fn main() {
5858 println ! ( "cargo:rustc-cfg=span_locations" ) ;
5959 }
6060
61- if version. minor < 54 {
62- println ! ( "cargo:rustc-cfg=no_literal_from_str" ) ;
63- }
64-
6561 if version. minor < 55 {
6662 println ! ( "cargo:rustc-cfg=no_group_open_close" ) ;
6763 }
Original file line number Diff line number Diff line change @@ -888,21 +888,7 @@ impl FromStr for Literal {
888888}
889889
890890fn compiler_literal_from_str ( repr : & str ) -> Result < proc_macro:: Literal , LexError > {
891- #[ cfg( not( no_literal_from_str) ) ]
892- {
893- proc_macro:: Literal :: from_str ( repr) . map_err ( LexError :: Compiler )
894- }
895- #[ cfg( no_literal_from_str) ]
896- {
897- let tokens = proc_macro_parse ( repr) ?;
898- let mut iter = tokens. into_iter ( ) ;
899- if let ( Some ( proc_macro:: TokenTree :: Literal ( literal) ) , None ) = ( iter. next ( ) , iter. next ( ) ) {
900- if literal. to_string ( ) . len ( ) == repr. len ( ) {
901- return Ok ( literal) ;
902- }
903- }
904- Err ( LexError :: call_site ( ) )
905- }
891+ proc_macro:: Literal :: from_str ( repr) . map_err ( LexError :: Compiler )
906892}
907893
908894impl Display for Literal {
You can’t perform that action at this time.
0 commit comments