2024-02-16 20:02:50 +00:00
|
|
|
//@ run-rustfix
|
2020-07-02 14:32:12 +09:00
|
|
|
|
|
|
|
|
#![allow(unused_assignments)]
|
|
|
|
|
#![allow(unused_variables)]
|
|
|
|
|
#![allow(dead_code)]
|
|
|
|
|
#![deny(unused_mut)]
|
|
|
|
|
|
|
|
|
|
struct Foo;
|
|
|
|
|
impl Foo {
|
|
|
|
|
fn foo(self) {} //~ ERROR: variable does not need to be mutable
|
|
|
|
|
fn bar(self: Box<Foo>) {} //~ ERROR: variable does not need to be mutable
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn main() {}
|