Destructuring boxed values

Hi,

Is it somehow possible to destructure a nested enum if the inner values are boxed?

Here is an example code with the issue: https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=12879daf57c025391d8c7efba18e2be5

Thanks in advance.

On nightly you can use box patterns, like box Expr::Val(_).

2 Likes