Related to #7623.
E.g., this compiles without errors;
script;
struct S {}
impl S {
fn method(self, ref mut _x: u64) { }
}
fn main() {
let x = 42u64; // <<<<<----- `x` is not mutable...
S {}.method(x); // <<<<<----- ...but is passed without errors.
}
The check is properly done on associated functions and module functions.
Related to #7623.
E.g., this compiles without errors;
The check is properly done on associated functions and module functions.