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() {
58
58
println ! ( "cargo:rustc-cfg=span_locations" ) ;
59
59
}
60
60
61
- if version. minor < 54 {
62
- println ! ( "cargo:rustc-cfg=no_literal_from_str" ) ;
63
- }
64
-
65
61
if version. minor < 55 {
66
62
println ! ( "cargo:rustc-cfg=no_group_open_close" ) ;
67
63
}
Original file line number Diff line number Diff line change @@ -888,21 +888,7 @@ impl FromStr for Literal {
888
888
}
889
889
890
890
fn 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 )
906
892
}
907
893
908
894
impl Display for Literal {
You can’t perform that action at this time.
0 commit comments