]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-6344-let.rs
Require Drop impls to have the same constness on its bounds as the bounds on the...
[rust.git] / src / test / ui / issues / issue-6344-let.rs
1 // run-pass
2 #![allow(non_shorthand_field_patterns)]
3
4 struct A { x: usize }
5
6 impl Drop for A {
7     fn drop(&mut self) {}
8 }
9
10 pub fn main() {
11     let a = A { x: 0 };
12
13     let A { x: ref x } = a;
14     println!("{}", x)
15 }