File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -871,7 +871,10 @@ fn digits(mut input: Cursor) -> Result<Cursor, Reject> {
871871fn punct ( input : Cursor ) -> PResult < Punct > {
872872 let ( rest, ch) = punct_char ( input) ?;
873873 if ch == '\'' {
874- if ident_any ( rest) ?. 0 . starts_with_char ( '\'' ) {
874+ let ( after_lifetime, _ident) = ident_any ( rest) ?;
875+ if after_lifetime. starts_with_char ( '\'' )
876+ || ( after_lifetime. starts_with_char ( '#' ) && !rest. starts_with ( "r#" ) )
877+ {
875878 Err ( Reject )
876879 } else {
877880 Ok ( ( rest, Punct :: new ( '\'' , Spacing :: Joint ) ) )
Original file line number Diff line number Diff line change @@ -523,7 +523,7 @@ fn lifetimes() {
523523 "' a" . parse :: < TokenStream > ( ) . unwrap_err ( ) ;
524524 "' r#gen" . parse :: < TokenStream > ( ) . unwrap_err ( ) ;
525525 "' prefix#lifetime" . parse :: < TokenStream > ( ) . unwrap_err ( ) ;
526- "'prefix#lifetime" . parse :: < TokenStream > ( ) . unwrap ( ) ; // FIXME
526+ "'prefix#lifetime" . parse :: < TokenStream > ( ) . unwrap_err ( ) ;
527527 "'aa'bb" . parse :: < TokenStream > ( ) . unwrap_err ( ) ;
528528 "'r#gen'a" . parse :: < TokenStream > ( ) . unwrap_err ( ) ;
529529}
You can’t perform that action at this time.
0 commit comments