rust/tests/ui/unnecessary_ref.fixed

15 lines
222 B
Rust
Raw Normal View History

2018-12-09 16:18:16 +01:00
// run-rustfix
#![feature(stmt_expr_attributes)]
#![allow(unused_variables)]
2018-12-09 16:18:16 +01:00
struct Outer {
inner: u32,
}
#[deny(clippy::ref_in_deref)]
fn main() {
let outer = Outer { inner: 0 };
let inner = outer.inner;
2018-12-09 16:18:16 +01:00
}