67ec1326ee
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; | ~ ```
23 lines
569 B
Plaintext
23 lines
569 B
Plaintext
error: unexpected `==`
|
|
--> $DIR/issue-101477-enum.rs:6:7
|
|
|
|
|
LL | B == 2
|
|
| ^^
|
|
|
|
|
= help: enum variants can be `Variant`, `Variant = <integer>`, `Variant(Type, ..., TypeN)` or `Variant { fields: Types }`
|
|
help: try using `=` instead
|
|
|
|
|
LL | B = 2
|
|
| ~
|
|
|
|
error: expected item, found `==`
|
|
--> $DIR/issue-101477-enum.rs:6:7
|
|
|
|
|
LL | B == 2
|
|
| ^^ expected item
|
|
|
|
|
= note: for a full list of items that can appear in modules, see <https://doc.rust-lang.org/reference/items.html>
|
|
|
|
error: aborting due to 2 previous errors
|
|
|