]> git.lizzy.rs Git - rust.git/blob - tests/ui/lint/unused/lint-unused-mut-self.rs
Rollup merge of #106670 - albertlarsan68:check-docs-in-pr-ci, r=Mark-Simulacrum
[rust.git] / tests / ui / lint / unused / lint-unused-mut-self.rs
1 // run-rustfix
2
3 #![allow(unused_assignments)]
4 #![allow(unused_variables)]
5 #![allow(dead_code)]
6 #![deny(unused_mut)]
7
8 struct Foo;
9 impl Foo {
10     fn foo(mut self) {} //~ ERROR: variable does not need to be mutable
11     fn bar(mut self: Box<Foo>) {} //~ ERROR: variable does not need to be mutable
12 }
13
14 fn main() {}