mirror of
https://github.com/rust-lang/rust.git
synced 2025-06-06 12:18:33 +00:00
15 lines
303 B
Rust
15 lines
303 B
Rust
![]() |
//@ 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() {}
|