summaryrefslogtreecommitdiffstats
path: root/src/test/ui/lint/unused/lint-unused-mut-self.rs
blob: 70736ce216e5ecce15108a44c539f6f024e385d2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// run-rustfix

#![allow(unused_assignments)]
#![allow(unused_variables)]
#![allow(dead_code)]
#![deny(unused_mut)]

struct Foo;
impl Foo {
    fn foo(mut self) {} //~ ERROR: variable does not need to be mutable
    fn bar(mut self: Box<Foo>) {} //~ ERROR: variable does not need to be mutable
}

fn main() {}