]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-17546.rs
Merge commit '98e2b9f25b6db4b2680a3d388456d9f95cb28344' into clippyup
[rust.git] / src / test / ui / issues / issue-17546.rs
1 // ignore-sgx std::os::fortanix_sgx::usercalls::raw::Result changes compiler suggestions
2
3 use foo::MyEnum::Result;
4 use foo::NoResult; // Through a re-export
5
6 mod foo {
7     pub use self::MyEnum::NoResult;
8
9     pub enum MyEnum {
10         Result,
11         NoResult
12     }
13
14     fn new() -> NoResult<MyEnum, String> {
15         //~^ ERROR expected type, found variant `NoResult`
16         unimplemented!()
17     }
18 }
19
20 mod bar {
21     use foo::MyEnum::Result;
22     use foo;
23
24     fn new() -> Result<foo::MyEnum, String> {
25         //~^ ERROR expected type, found variant `Result`
26         unimplemented!()
27     }
28 }
29
30 fn new() -> Result<foo::MyEnum, String> {
31     //~^ ERROR expected type, found variant `Result`
32     unimplemented!()
33 }
34
35 fn newer() -> NoResult<foo::MyEnum, String> {
36     //~^ ERROR expected type, found variant `NoResult`
37     unimplemented!()
38 }
39
40 fn main() {
41     let _ = new();
42 }