rust/tests/ui/lint/unused/lint-unused-mut-self.fixed

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

15 lines
302 B
Rust
Raw Normal View History

2020-07-02 00:32:12 -05:00
// run-rustfix
#![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() {}