rust/tests/ui/lowering/expr-in-pat-issue-99380.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

12 lines
201 B
Rust
Raw Normal View History

macro_rules! foo {
($p:expr) => {
if let $p = Some(42) {
return;
}
};
}
fn main() {
foo!(Some(3)); //~ ERROR arbitrary expressions aren't allowed in patterns
}