@@ -49,7 +49,7 @@ pub(super) enum DestructuredFloat {
49
49
/// 1.2 | 1.2e3
50
50
MiddleDot ( Symbol , Span , Span , Symbol , Span ) ,
51
51
/// Invalid
52
- Error ( ErrorGuaranteed ) ,
52
+ Error ,
53
53
}
54
54
55
55
impl < ' a > Parser < ' a > {
@@ -1005,7 +1005,7 @@ impl<'a> Parser<'a> {
1005
1005
self . mk_expr_tuple_field_access ( lo, ident1_span, base, sym1, None ) ;
1006
1006
self . mk_expr_tuple_field_access ( lo, ident2_span, base1, sym2, suffix)
1007
1007
}
1008
- DestructuredFloat :: Error ( _ ) => base,
1008
+ DestructuredFloat :: Error => base,
1009
1009
} )
1010
1010
}
1011
1011
_ => {
@@ -1015,7 +1015,7 @@ impl<'a> Parser<'a> {
1015
1015
}
1016
1016
}
1017
1017
1018
- fn error_unexpected_after_dot ( & self ) -> ErrorGuaranteed {
1018
+ fn error_unexpected_after_dot ( & self ) {
1019
1019
let actual = pprust:: token_to_string ( & self . token ) ;
1020
1020
let span = self . token . span ;
1021
1021
let sm = self . psess . source_map ( ) ;
@@ -1025,7 +1025,7 @@ impl<'a> Parser<'a> {
1025
1025
}
1026
1026
_ => ( span, actual) ,
1027
1027
} ;
1028
- self . dcx ( ) . emit_err ( errors:: UnexpectedTokenAfterDot { span, actual } )
1028
+ self . dcx ( ) . emit_err ( errors:: UnexpectedTokenAfterDot { span, actual } ) ;
1029
1029
}
1030
1030
1031
1031
/// We need an identifier or integer, but the next token is a float.
@@ -1111,8 +1111,8 @@ impl<'a> Parser<'a> {
1111
1111
// 1.2e+3 | 1.2e-3
1112
1112
[ IdentLike ( _) , Punct ( '.' ) , IdentLike ( _) , Punct ( '+' | '-' ) , IdentLike ( _) ] => {
1113
1113
// See the FIXME about `TokenCursor` above.
1114
- let guar = self . error_unexpected_after_dot ( ) ;
1115
- DestructuredFloat :: Error ( guar )
1114
+ self . error_unexpected_after_dot ( ) ;
1115
+ DestructuredFloat :: Error
1116
1116
}
1117
1117
_ => panic ! ( "unexpected components in a float token: {components:?}" ) ,
1118
1118
}
@@ -1178,7 +1178,7 @@ impl<'a> Parser<'a> {
1178
1178
fields. insert ( start_idx, Ident :: new ( symbol2, span2) ) ;
1179
1179
fields. insert ( start_idx, Ident :: new ( symbol1, span1) ) ;
1180
1180
}
1181
- DestructuredFloat :: Error ( _ ) => {
1181
+ DestructuredFloat :: Error => {
1182
1182
trailing_dot = None ;
1183
1183
fields. insert ( start_idx, Ident :: new ( symbol, self . prev_token . span ) ) ;
1184
1184
}
0 commit comments