error[E0308]: mismatched types --> tests/compile_fail/struct_by_val.rs:15:8 | 15 | fn foo(_foo: Foo) {} // Fail | --- ^^^^ expected `Foo`, found `&mut _` | | | arguments to this function are incorrect | = note: expected struct `Foo` found mutable reference `&mut _` note: function defined here --> tests/compile_fail/struct_by_val.rs:15:4 | 15 | fn foo(_foo: Foo) {} // Fail | ^^^ ---------