]>
Commit | Line | Data |
---|---|---|
f9f354fc XL |
1 | // ignore-sgx std::os::fortanix_sgx::usercalls::raw::Result changes compiler suggestions |
2 | ||
c1a9b12d SL |
3 | use foo::MyEnum::Result; |
4 | use foo::NoResult; // Through a re-export | |
5 | ||
6 | mod foo { | |
7 | pub use self::MyEnum::NoResult; | |
8 | ||
9cc50fc6 | 9 | pub enum MyEnum { |
c1a9b12d SL |
10 | Result, |
11 | NoResult | |
12 | } | |
13 | ||
14 | fn new() -> NoResult<MyEnum, String> { | |
32a655c1 | 15 | //~^ ERROR expected type, found variant `NoResult` |
c1a9b12d SL |
16 | unimplemented!() |
17 | } | |
18 | } | |
19 | ||
20 | mod bar { | |
21 | use foo::MyEnum::Result; | |
22 | use foo; | |
23 | ||
24 | fn new() -> Result<foo::MyEnum, String> { | |
32a655c1 | 25 | //~^ ERROR expected type, found variant `Result` |
c1a9b12d SL |
26 | unimplemented!() |
27 | } | |
28 | } | |
29 | ||
30 | fn new() -> Result<foo::MyEnum, String> { | |
32a655c1 | 31 | //~^ ERROR expected type, found variant `Result` |
c1a9b12d SL |
32 | unimplemented!() |
33 | } | |
34 | ||
35 | fn newer() -> NoResult<foo::MyEnum, String> { | |
32a655c1 | 36 | //~^ ERROR expected type, found variant `NoResult` |
c1a9b12d SL |
37 | unimplemented!() |
38 | } | |
39 | ||
40 | fn main() { | |
41 | let _ = new(); | |
42 | } |