mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-17 18:28:40 +00:00
38d4ac7cea
Discussion previously happened in https://github.com/rust-lang/rust/pull/43498
14 lines
225 B
Rust
14 lines
225 B
Rust
// run-rustfix
|
|
|
|
#![feature(stmt_expr_attributes)]
|
|
#![allow(unused_variables)]
|
|
|
|
struct Outer {
|
|
inner: u32,
|
|
}
|
|
|
|
#[deny(clippy::ref_in_deref)]
|
|
fn main() {
|
|
let outer = Outer { inner: 0 };
|
|
let inner = (&outer).inner;
|
|
}
|