]> git.proxmox.com Git - rustc.git/blame - src/test/ui/let-else/let-else-destructuring.rs
Update unsuspicious file list
[rustc.git] / src / test / ui / let-else / let-else-destructuring.rs
CommitLineData
5e7ed085
FG
1#[derive(Debug)]
2enum Foo {
3 Done,
4 Nested(Option<&'static Foo>),
5}
6
7fn walk(mut value: &Foo) {
8 loop {
9 println!("{:?}", value);
10 &Foo::Nested(Some(value)) = value else { break }; //~ ERROR invalid left-hand side of assignment
11 //~^ERROR <assignment> ... else { ... } is not allowed
12 }
13}
14
15fn main() {
16 walk(&Foo::Done);
17}