36 lines
1.1 KiB
Plaintext
36 lines
1.1 KiB
Plaintext
|
|
error[E0308]: mismatched types
|
||
|
|
--> $DIR/ref-binding-on-inh-ref-errors.rs:46:10
|
||
|
|
|
|
||
|
|
LL | let [&ref x] = &[&mut 0];
|
||
|
|
| ^^^^^^ --------- this expression has type `&[&mut {integer}; 1]`
|
||
|
|
| |
|
||
|
|
| types differ in mutability
|
||
|
|
|
|
||
|
|
= note: expected mutable reference `&mut {integer}`
|
||
|
|
found reference `&_`
|
||
|
|
help: consider removing `&` from the pattern
|
||
|
|
|
|
||
|
|
LL - let [&ref x] = &[&mut 0];
|
||
|
|
LL + let [ref x] = &[&mut 0];
|
||
|
|
|
|
||
|
|
|
||
|
|
error[E0308]: mismatched types
|
||
|
|
--> $DIR/ref-binding-on-inh-ref-errors.rs:53:10
|
||
|
|
|
|
||
|
|
LL | let [&ref x] = &mut [&mut 0];
|
||
|
|
| ^^^^^^ ------------- this expression has type `&mut [&mut {integer}; 1]`
|
||
|
|
| |
|
||
|
|
| types differ in mutability
|
||
|
|
|
|
||
|
|
= note: expected mutable reference `&mut {integer}`
|
||
|
|
found reference `&_`
|
||
|
|
help: consider removing `&` from the pattern
|
||
|
|
|
|
||
|
|
LL - let [&ref x] = &mut [&mut 0];
|
||
|
|
LL + let [ref x] = &mut [&mut 0];
|
||
|
|
|
|
||
|
|
|
||
|
|
error: aborting due to 2 previous errors
|
||
|
|
|
||
|
|
For more information about this error, try `rustc --explain E0308`.
|