rust/tests/ui/parser/recover
Esteban Küber 67ec1326ee Fix ICE in suggestion caused by being recovered as ==
The second suggestion shown here would previously incorrectly assume that the span corresponding to `⩵` was 2 bytes wide composed by 2 1 byte wide chars, so a span pointing at `==` could point only at one of the `=` to remove it. Instead, we now replace the whole thing (as we should have the whole time):

```
error: unknown start of token: \u{2a75}
  --> $DIR/unicode-double-equals-recovery.rs:1:16
   |
LL | const A: usize ⩵ 2;
   |                ^
   |
help: Unicode character '⩵' (Two Consecutive Equals Signs) looks like '==' (Double Equals Sign), but it is not
   |
LL | const A: usize == 2;
   |                ~~

error: unexpected `==`
  --> $DIR/unicode-double-equals-recovery.rs:1:16
   |
LL | const A: usize ⩵ 2;
   |                ^
   |
help: try using `=` instead
   |
LL | const A: usize = 2;
   |                ~
```
2024-07-18 17:47:31 +00:00
..
binding-name-starting-with-number.rs
binding-name-starting-with-number.stderr
recover-assoc-const-constraint.rs
recover-assoc-const-constraint.stderr
recover-assoc-eq-missing-term.rs
recover-assoc-eq-missing-term.stderr
recover-assoc-lifetime-constraint.rs
recover-assoc-lifetime-constraint.stderr
recover-colon-instead-of-eq-in-local.rs
recover-colon-instead-of-eq-in-local.stderr
recover-const-async-fn-ptr.rs
recover-const-async-fn-ptr.stderr Make parse error suggestions verbose and fix spans 2024-07-12 03:02:57 +00:00
recover-enum2.rs
recover-enum2.stderr
recover-enum.rs
recover-enum.stderr
recover-field-extra-angle-brackets-in-struct-with-a-field.rs
recover-field-extra-angle-brackets-in-struct-with-a-field.stderr Make parse error suggestions verbose and fix spans 2024-07-12 03:02:57 +00:00
recover-field-extra-angle-brackets.rs
recover-field-extra-angle-brackets.stderr Make parse error suggestions verbose and fix spans 2024-07-12 03:02:57 +00:00
recover-field-semi.rs
recover-field-semi.stderr
recover-fn-ptr-with-generics.rs
recover-fn-ptr-with-generics.stderr
recover-fn-trait-from-fn-kw.rs
recover-fn-trait-from-fn-kw.stderr
recover-for-loop-parens-around-head.fixed
recover-for-loop-parens-around-head.rs
recover-for-loop-parens-around-head.stderr
recover-from-bad-variant.rs
recover-from-bad-variant.stderr
recover-from-homoglyph.rs
recover-from-homoglyph.stderr
recover-labeled-non-block-expr.fixed
recover-labeled-non-block-expr.rs
recover-labeled-non-block-expr.stderr Fix ... in multline code-skips in suggestions 2024-06-20 04:25:17 +00:00
recover-missing-semi-before-item.fixed
recover-missing-semi-before-item.rs
recover-missing-semi-before-item.stderr Make ; suggestions inline 2024-07-12 03:22:32 +00:00
recover-missing-semi.rs
recover-missing-semi.stderr Make ; suggestions inline 2024-07-12 03:22:32 +00:00
recover-parens-around-match-arm-head.fixed
recover-parens-around-match-arm-head.rs
recover-parens-around-match-arm-head.stderr
recover-quantified-closure.rs
recover-quantified-closure.stderr
recover-range-pats.rs Stabilize exclusive_range 2024-05-02 19:42:31 -04:00
recover-range-pats.stderr Make parse error suggestions verbose and fix spans 2024-07-12 03:02:57 +00:00
recover-ref-dyn-mut.rs
recover-ref-dyn-mut.stderr Make parse error suggestions verbose and fix spans 2024-07-12 03:02:57 +00:00
recover-struct.rs
recover-struct.stderr
recover-tuple-pat.rs
recover-tuple-pat.stderr
recover-tuple.rs
recover-tuple.stderr
recover-unticked-labels.fixed
recover-unticked-labels.rs
recover-unticked-labels.stderr Make parse error suggestions verbose and fix spans 2024-07-12 03:02:57 +00:00
recover-where-clause-before-tuple-struct-body-0.fixed Detect pub structs never constructed and unused associated constants in traits 2024-06-05 23:20:09 +08:00
recover-where-clause-before-tuple-struct-body-0.rs Detect pub structs never constructed and unused associated constants in traits 2024-06-05 23:20:09 +08:00
recover-where-clause-before-tuple-struct-body-0.stderr Detect pub structs never constructed and unused associated constants in traits 2024-06-05 23:20:09 +08:00
recover-where-clause-before-tuple-struct-body-1.rs
recover-where-clause-before-tuple-struct-body-1.stderr
turbofish-arg-with-stray-colon.rs Make sure we consume a generic arg when checking mistyped turbofish 2024-05-09 10:47:14 -04:00
turbofish-arg-with-stray-colon.stderr Make sure we consume a generic arg when checking mistyped turbofish 2024-05-09 10:47:14 -04:00
unicode-double-equals-recovery.rs Fix ICE in suggestion caused by being recovered as == 2024-07-18 17:47:31 +00:00
unicode-double-equals-recovery.stderr Fix ICE in suggestion caused by being recovered as == 2024-07-18 17:47:31 +00:00