error[E0658]: binding cannot be both mutable and by-reference
  --> $DIR/mut-ref-mut.rs:20:13
   |
LL |     let Foo(mut a) = &Foo(0);
   |             ^^^^
   |
   = note: see issue #123076 <https://github.com/rust-lang/rust/issues/123076> for more information
   = help: add `#![feature(mut_ref)]` to the crate attributes to enable
   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date

error[E0658]: binding cannot be both mutable and by-reference
  --> $DIR/mut-ref-mut.rs:25:13
   |
LL |     let Foo(mut a) = &mut Foo(0);
   |             ^^^^
   |
   = note: see issue #123076 <https://github.com/rust-lang/rust/issues/123076> for more information
   = help: add `#![feature(mut_ref)]` to the crate attributes to enable
   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date

error[E0308]: mismatched types
  --> $DIR/mut-ref-mut.rs:30:10
   |
LL |     let [&mut mut x] = &[&mut 0];
   |          ^^^^^
   |
   = note: cannot match inherited `&` with `&mut` pattern
help: replace this `&mut` pattern with `&`
   |
LL -     let [&mut mut x] = &[&mut 0];
LL +     let [&mut x] = &[&mut 0];
   |

error: aborting due to 3 previous errors

Some errors have detailed explanations: E0308, E0658.
For more information about an error, try `rustc --explain E0308`.
