rust/tests/ui/unnecessary_ref.rs

13 lines
202 B
Rust
Raw Normal View History

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