rust-clippy/tests/ui/unnecessary_ref.rs

15 lines
235 B
Rust
Raw Normal View History

2018-07-28 15:34:52 +00:00
#![feature(tool_lints)]
2018-05-28 07:29:02 +00:00
#![feature(tool_attributes)]
#![feature(stmt_expr_attributes)]
struct Outer {
inner: u32,
}
2018-07-28 15:34:52 +00:00
#[deny(clippy::ref_in_deref)]
2018-05-28 07:29:02 +00:00
fn main() {
let outer = Outer { inner: 0 };
let inner = (&outer).inner;
}