-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ICE with the (foo @ ..,)
pattern
#74702
Comments
@petrochenkov, this would normally be invalid syntax, much like in this case. The only reason it is accepted as far as parsing, resolve and/or AST lowering is so that the diagnostics are more informative. Therefore, while the syntactic form is carried over further into the compiler pipeline for this very purpose, it seems reasonable to invalidate/ignore some of its effects (like, indeed, not resolve the binding it introduces) as early as possible. Or perhaps I'm missing something? This isn't to say the fix was ideal, which #74692 demonstrates. 🙂 Sorry for that! |
@jakubadamw
|
Assigning Also nominating for discussion given @petrochenkov's comments here and here. |
Fix ICEs with `@ ..` binding This reverts rust-lang#74557 and introduces an alternative fix while ensuring that rust-lang#74954 is not broken. The diagnostics are verbose though, it fixes three related issues. cc rust-lang#74954, rust-lang#74539, and rust-lang#74702
It's fixed by #74963. I'm going just to close this as fixed. |
Closely related to #74539, where the
foo @ ..
was inside an EnumItemTuple pattern, instead of a plain Tuple pattern.(Playground)
rustc --version
:Errors:
Backtrace
The text was updated successfully, but these errors were encountered: