]> git.lizzy.rs Git - rust.git/blob - src/test/ui/lint/lint-unused-mut-self.rs
Rollup merge of #69920 - Centril:hir-cleanup, r=Zoxc
[rust.git] / src / test / ui / lint / lint-unused-mut-self.rs
1 #![allow(unused_assignments)]
2 #![allow(unused_variables)]
3 #![allow(dead_code)]
4 #![deny(unused_mut)]
5
6 struct Foo;
7 impl Foo {
8     fn foo(mut self) {} //~ ERROR: variable does not need to be mutable
9     fn bar(mut self: Box<Foo>) {} //~ ERROR: variable does not need to be mutable
10 }
11
12 fn main() {}