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
The error you got is due to the standard prelude not being included by gccrs, as we cannot yet compile Rust's core library (which defines the Option type and its two None and Some variants). Here is a testcase which does not depend on core:
enumAnEnum{VariantA(i32),VariantB(f32),}fnmain(){let x = AnEnum::VariantA(15);letAnEnum::VariantA(x_inner) = x;}
which errors out with
arthur@platypus ~/G/r/gccrs(nr2.0-early-name-resolver)[1]> build/gcc/crab1 test.rs
test.rs:8:9: sorry, unimplemented: tuple-struct pattern let statements not supported
8 | let AnEnum::VariantA(x_inner) = x;
| ^~~~~~
Refutable pattern in local binding -
E0005
Patterns used to bind names must be irrefutable, that is, they must guarantee that a name will be extracted in all cases.
compiler-explorer
I tried this code from
E0005
:godbolt
I expected to see this happen:
Instead, this happened:
Meta
The text was updated successfully, but these errors were encountered: