summary refs log tree commit diff
path: root/src/tools/clippy/tests/ui/unnecessary_ref.rs
blob: 4e585b9b96ba9461aaf082f014f5570177b11cce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// 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;
}