error: the trait `Foo` cannot be auto-implemented for immutable references, because this method has a `self` receiver (only `&self` and no receiver are allowed)
--> tests/compile-fail/value_self_for_immutable_ref.rs:6:5
|
6 | fn foo(self);
| ^^^^^^^^^^^^