]> git.proxmox.com Git - rustc.git/blame - src/test/ui/issues/issue-17546.rs
New upstream version 1.60.0+dfsg1
[rustc.git] / src / test / ui / issues / issue-17546.rs
CommitLineData
f9f354fc
XL
1// ignore-sgx std::os::fortanix_sgx::usercalls::raw::Result changes compiler suggestions
2
c1a9b12d
SL
3use foo::MyEnum::Result;
4use foo::NoResult; // Through a re-export
5
6mod 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
20mod 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
30fn new() -> Result<foo::MyEnum, String> {
32a655c1 31 //~^ ERROR expected type, found variant `Result`
c1a9b12d
SL
32 unimplemented!()
33}
34
35fn newer() -> NoResult<foo::MyEnum, String> {
32a655c1 36 //~^ ERROR expected type, found variant `NoResult`
c1a9b12d
SL
37 unimplemented!()
38}
39
40fn main() {
41 let _ = new();
42}