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
#![allow(unused)]fnmain(){matchSome(0){Some(bar) => {/* ... */}
x => {/* ... */}// This handles the `None` case
_ => {/* ... */}// All possible cases have already been handled}}
I expected to see this happen:
Compile successfully like rustc.
Instead, this happened:
Give error
➜ gccrs-build gcc/crab1 ../mahad-testsuite/E0001.rs
../mahad-testsuite/E0001.rs:3:7: error: Cannot find path ‘Some’ in this scope [E0433]
3 | match Some(0) {
| ^~~~
../mahad-testsuite/E0001.rs:4:5: error: Cannot find path ‘Some’ in this scope [E0433]
4 | Some(bar) => {/* ... */}
| ^~~~
Meta
What version of Rust GCC were you using, git sha 6c63150
This error is no longer emitted by rustc, and isn't emitted by rustc 1.49, so I don't think we should emit the error. We can compile this correctly, if we use an enum defined in the current crate instead of core:
E0001
unreachable patterngodbolt
I tried this code from
E0001
I expected to see this happen:
Instead, this happened:
Meta
The text was updated successfully, but these errors were encountered: