You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rustc panics when trying to compile this (incorrect) code:
structSomeStruct{a:i32}fnmain(){let s = SomeStruct{a:1};letSomeStruct::SomeStruct{ a } = s;// ^^^^^^^^^^^^ - this part is nonsense, but instead of an error rustc crashes}
This is the smallest example I could get. The same error happens when that pattern is used inside if let or a match.
It does not happen with stable (rustc 1.10.0-beta.2 (39f3c16cc 2016-05-26)) or beta (rustc 1.9.0 (e4e8b6668 2016-05-18)) versions. With them I get error message as expected:
main.rs:8:9: 8:31 error: failed to resolve. Use of undeclared type or module `SomeStruct` [E0433]
main.rs:8 let SomeStruct::SomeStruct{a} = s;
^~~~~~~~~~~~~~~~~~~~~~
main.rs:8:9: 8:31 help: run `rustc --explain E0433` to see a detailed explanation
main.rs:8:9: 8:34 error: `SomeStruct::SomeStruct` does not name a struct or a struct variant [E0163]
main.rs:8 let SomeStruct::SomeStruct{a} = s;
^~~~~~~~~~~~~~~~~~~~~~~~~
main.rs:8:9: 8:34 help: run `rustc --explain E0163` to see a detailed explanation
error: aborting due to previous error
The text was updated successfully, but these errors were encountered:
Rustc panics when trying to compile this (incorrect) code:
This is the smallest example I could get. The same error happens when that pattern is used inside if let or a match.
Backtrace:
It happens with nightly (installed using rustup):
It does not happen with stable (
rustc 1.10.0-beta.2 (39f3c16cc 2016-05-26)
) or beta (rustc 1.9.0 (e4e8b6668 2016-05-18)
) versions. With them I get error message as expected:The text was updated successfully, but these errors were encountered: