]> git.lizzy.rs Git - rust.git/blob - src/test/ui/parenthesized-deref-suggestion.rs
Merge commit '0eff589afc83e21a03a168497bbab6b4dfbb4ef6' into clippyup
[rust.git] / src / test / ui / parenthesized-deref-suggestion.rs
1 struct Session {
2     opts: u8,
3 }
4
5 fn main() {
6     let sess: &Session = &Session { opts: 0 };
7     (sess as *const Session).opts; //~ ERROR no field `opts` on type `*const Session`
8
9     let x = [0u32];
10     (x as [u32; 1]).0; //~ ERROR no field `0` on type `[u32; 1]`
11 }