rust/tests/ui/coercion/mut-mut-wont-coerce.stderr
2024-05-03 20:19:20 -07:00

20 lines
619 B
Plaintext

error[E0308]: mismatched types
--> $DIR/mut-mut-wont-coerce.rs:36:14
|
LL | make_foo(&mut &mut *result);
| -------- ^^^^^^^^^^^^^^^^^ expected `*mut *mut Foo`, found `&mut &mut Foo`
| |
| arguments to this function are incorrect
|
= note: expected raw pointer `*mut *mut Foo`
found mutable reference `&mut &mut Foo`
note: function defined here
--> $DIR/mut-mut-wont-coerce.rs:30:4
|
LL | fn make_foo(_: *mut *mut Foo) {
| ^^^^^^^^ ----------------
error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.