]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-24365.rs
Merge commit '6ed6f1e6a1a8f414ba7e6d9b8222e7e5a1686e42' into clippyup
[rust.git] / src / test / ui / issues / issue-24365.rs
1 pub enum Attribute {
2     Code {attr_name_idx: u16},
3 }
4
5 pub enum Foo {
6     Bar
7 }
8
9 fn test(a: Foo) {
10     println!("{}", a.b); //~ no field `b` on type `Foo`
11 }
12
13 fn main() {
14     let x = Attribute::Code {
15         attr_name_idx: 42,
16     };
17     let z = (&x).attr_name_idx; //~ no field `attr_name_idx` on type `&Attribute`
18     let y = x.attr_name_idx; //~ no field `attr_name_idx` on type `Attribute`
19 }