error[E0658]: binding cannot be both mutable and by-reference
  --> $DIR/mixed-editions.rs:37:21
   |
LL |     let match_ctor!(mut x) = &[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[E0596]: cannot borrow as mutable inside an `&` pattern
  --> $DIR/mixed-editions.rs:76:21
   |
LL |     let match_ref!([x]) = &mut &mut [0];
   |                     ^

error[E0596]: cannot borrow as mutable inside an `&` pattern
  --> $DIR/mixed-editions.rs:80:22
   |
LL |     let &match_ctor!(y) = &mut &mut [0];
   |         -            ^
   |         |
   |         help: replace this `&` with `&mut`: `&mut`

error[E0596]: cannot borrow as mutable inside an `&` pattern
  --> $DIR/mixed-editions.rs:84:17
   |
LL |     let &[bind!(z)] = &mut &mut [0];
   |         -       ^
   |         |
   |         help: replace this `&` with `&mut`: `&mut`

error[E0596]: cannot borrow as mutable inside an `&` pattern
  --> $DIR/mixed-editions.rs:110:28
   |
LL |     let match_ref!(ref mut x) = &mut 0;
   |                            ^

error[E0596]: cannot borrow as mutable inside an `&` pattern
  --> $DIR/mixed-editions.rs:112:24
   |
LL |     let &bind_ref_mut!(x) = &mut 0;
   |         -              ^
   |         |
   |         help: replace this `&` with `&mut`: `&mut`

error[E0596]: cannot borrow as mutable inside an `&` pattern
  --> $DIR/mixed-editions.rs:116:29
   |
LL |     let [match_ref!(ref mut x)] = &mut [0];
   |                             ^

error[E0596]: cannot borrow as mutable inside an `&` pattern
  --> $DIR/mixed-editions.rs:118:25
   |
LL |     let [&bind_ref_mut!(x)] = &mut [0];
   |          -              ^
   |          |
   |          help: replace this `&` with `&mut`: `&mut`

error: cannot explicitly borrow within an implicitly-borrowing pattern
  --> $DIR/mixed-editions.rs:26:21
   |
LL |     let match_ctor!(ref x) = &[0];
   |                     ^^^ explicit `ref` binding modifier not allowed when implicitly borrowing
   |
   = note: for more information, see <https://doc.rust-lang.org/reference/patterns.html#binding-modes>
help: match on the reference with a reference pattern to avoid implicitly borrowing
  --> $DIR/auxiliary/mixed-editions-macros.rs:11:9
   |
LL |         &[$p]
   |         +

error[E0596]: cannot borrow data in a `&` reference as mutable
  --> $DIR/mixed-editions.rs:61:21
   |
LL |     let match_ref!([x]) = &&mut [0];
   |                     ^     --------- this cannot be borrowed as mutable
   |                     |
   |                     cannot borrow as mutable

error[E0596]: cannot borrow data in a `&` reference as mutable
  --> $DIR/mixed-editions.rs:65:22
   |
LL |     let &match_ctor!(y) = &&mut [0];
   |                      ^    --------- this cannot be borrowed as mutable
   |                      |
   |                      cannot borrow as mutable

error[E0596]: cannot borrow data in a `&` reference as mutable
  --> $DIR/mixed-editions.rs:69:11
   |
LL |     let &[bind!(z)] = &&mut [0];
   |           ^^^^^^^^    --------- this cannot be borrowed as mutable
   |           |
   |           cannot borrow as mutable
   |
   = note: this error originates in the macro `bind` (in Nightly builds, run with -Z macro-backtrace for more info)

error: aborting due to 12 previous errors

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