]> git.lizzy.rs Git - rust.git/blob - src/test/ui/span/issue-24356.rs
Rollup merge of #87922 - Manishearth:c-enum-target-spec, r=nagisa,eddyb
[rust.git] / src / test / ui / span / issue-24356.rs
1 // Regression test for #24356
2
3 fn main() {
4     {
5         use std::ops::Deref;
6
7         struct Thing(i8);
8
9         /*
10         // Correct impl
11         impl Deref for Thing {
12             type Target = i8;
13             fn deref(&self) -> &i8 { &self.0 }
14         }
15         */
16
17         // Causes ICE
18         impl Deref for Thing {
19             //~^ ERROR E0046
20             fn deref(&self) -> i8 { self.0 }
21         }
22
23         let thing = Thing(72);
24
25         *thing
26     };
27 }