2021-04-12 19:06:11 +00:00
|
|
|
error: expected one of `>`, a const expression, lifetime, or type, found `}`
|
|
|
|
--> $DIR/issue-84117.rs:2:67
|
|
|
|
|
|
|
|
|
LL | let outer_local:e_outer<&str, { let inner_local:e_inner<&str, }
|
Detect more cases of `=` to `:` typo
When a `Local` is fully parsed, but not followed by a `;`, keep the `:` span
arround and mention it. If the type could continue being parsed as an
expression, suggest replacing the `:` with a `=`.
```
error: expected one of `!`, `+`, `->`, `::`, `;`, or `=`, found `.`
--> file.rs:2:32
|
2 | let _: std::env::temp_dir().join("foo");
| - ^ expected one of `!`, `+`, `->`, `::`, `;`, or `=`
| |
| while parsing the type for `_`
| help: use `=` if you meant to assign
```
Fix #119665.
2024-02-27 00:48:32 +00:00
|
|
|
| - ^ expected one of `>`, a const expression, lifetime, or type
|
|
|
|
| |
|
|
|
|
| while parsing the type for `inner_local`
|
2022-03-01 19:40:48 +00:00
|
|
|
|
|
|
|
|
help: you might have meant to end the type parameters here
|
|
|
|
|
|
|
|
|
LL | let outer_local:e_outer<&str, { let inner_local:e_inner<&str>, }
|
|
|
|
| +
|
|
|
|
help: use `=` if you meant to assign
|
|
|
|
|
|
|
|
|
LL | let outer_local:e_outer<&str, { let inner_local =e_inner<&str, }
|
|
|
|
| ~
|
2021-04-12 19:06:11 +00:00
|
|
|
|
2021-08-02 00:55:48 +00:00
|
|
|
error: expected one of `!`, `.`, `::`, `;`, `?`, `else`, `{`, or an operator, found `,`
|
2021-04-12 19:06:11 +00:00
|
|
|
--> $DIR/issue-84117.rs:2:65
|
|
|
|
|
|
|
|
|
LL | let outer_local:e_outer<&str, { let inner_local:e_inner<&str, }
|
2021-08-02 00:55:48 +00:00
|
|
|
| ^ expected one of 8 possible tokens
|
2021-04-12 19:06:11 +00:00
|
|
|
|
2022-05-01 17:05:35 +00:00
|
|
|
error: expected one of `,` or `>`, found `}`
|
2021-04-12 19:06:11 +00:00
|
|
|
--> $DIR/issue-84117.rs:8:1
|
|
|
|
|
|
|
|
|
LL | let outer_local:e_outer<&str, { let inner_local:e_inner<&str, }
|
Detect more cases of `=` to `:` typo
When a `Local` is fully parsed, but not followed by a `;`, keep the `:` span
arround and mention it. If the type could continue being parsed as an
expression, suggest replacing the `:` with a `=`.
```
error: expected one of `!`, `+`, `->`, `::`, `;`, or `=`, found `.`
--> file.rs:2:32
|
2 | let _: std::env::temp_dir().join("foo");
| - ^ expected one of `!`, `+`, `->`, `::`, `;`, or `=`
| |
| while parsing the type for `_`
| help: use `=` if you meant to assign
```
Fix #119665.
2024-02-27 00:48:32 +00:00
|
|
|
| - while parsing the type for `outer_local` - expected one of `,` or `>`
|
2021-04-12 19:06:11 +00:00
|
|
|
...
|
|
|
|
LL | }
|
|
|
|
| ^ unexpected token
|
2022-03-01 19:40:48 +00:00
|
|
|
|
|
|
|
|
help: you might have meant to end the type parameters here
|
|
|
|
|
|
|
|
|
LL | let outer_local:e_outer<&str, { let inner_local:e_inner<&str, }>
|
|
|
|
| +
|
|
|
|
help: use `=` if you meant to assign
|
|
|
|
|
|
|
|
|
LL | let outer_local =e_outer<&str, { let inner_local:e_inner<&str, }
|
|
|
|
| ~
|
2021-04-12 19:06:11 +00:00
|
|
|
|
|
|
|
error: expected one of `>`, a const expression, lifetime, or type, found `}`
|
|
|
|
--> $DIR/issue-84117.rs:2:67
|
|
|
|
|
|
|
|
|
LL | let outer_local:e_outer<&str, { let inner_local:e_inner<&str, }
|
Detect more cases of `=` to `:` typo
When a `Local` is fully parsed, but not followed by a `;`, keep the `:` span
arround and mention it. If the type could continue being parsed as an
expression, suggest replacing the `:` with a `=`.
```
error: expected one of `!`, `+`, `->`, `::`, `;`, or `=`, found `.`
--> file.rs:2:32
|
2 | let _: std::env::temp_dir().join("foo");
| - ^ expected one of `!`, `+`, `->`, `::`, `;`, or `=`
| |
| while parsing the type for `_`
| help: use `=` if you meant to assign
```
Fix #119665.
2024-02-27 00:48:32 +00:00
|
|
|
| - ^ expected one of `>`, a const expression, lifetime, or type
|
|
|
|
| |
|
|
|
|
| while parsing the type for `inner_local`
|
2022-03-01 19:40:48 +00:00
|
|
|
|
|
2023-10-04 18:34:50 +00:00
|
|
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
2022-03-01 19:40:48 +00:00
|
|
|
help: you might have meant to end the type parameters here
|
|
|
|
|
|
|
|
|
LL | let outer_local:e_outer<&str, { let inner_local:e_inner<&str>, }
|
|
|
|
| +
|
|
|
|
help: use `=` if you meant to assign
|
|
|
|
|
|
|
|
|
LL | let outer_local:e_outer<&str, { let inner_local =e_inner<&str, }
|
|
|
|
| ~
|
2021-04-12 19:06:11 +00:00
|
|
|
|
2021-08-02 00:55:48 +00:00
|
|
|
error: expected one of `!`, `.`, `::`, `;`, `?`, `else`, `{`, or an operator, found `,`
|
2021-04-12 19:06:11 +00:00
|
|
|
--> $DIR/issue-84117.rs:2:65
|
|
|
|
|
|
|
|
|
LL | let outer_local:e_outer<&str, { let inner_local:e_inner<&str, }
|
2021-08-02 00:55:48 +00:00
|
|
|
| ^ expected one of 8 possible tokens
|
2023-10-04 18:34:50 +00:00
|
|
|
|
|
|
|
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
2021-04-12 19:06:11 +00:00
|
|
|
|
2021-08-02 00:55:48 +00:00
|
|
|
error: expected one of `!`, `.`, `::`, `;`, `?`, `else`, `{`, or an operator, found `,`
|
2021-04-12 19:06:11 +00:00
|
|
|
--> $DIR/issue-84117.rs:2:33
|
|
|
|
|
|
|
|
|
LL | let outer_local:e_outer<&str, { let inner_local:e_inner<&str, }
|
2021-08-02 00:55:48 +00:00
|
|
|
| ^ expected one of 8 possible tokens
|
2021-04-12 19:06:11 +00:00
|
|
|
|
|
|
|
error: aborting due to 6 previous errors
|
|
|
|
|