2020-05-06 01:12:50 +00:00
|
|
|
//@ ignore-sgx std::os::fortanix_sgx::usercalls::raw::Result changes compiler suggestions
|
|
|
|
|
2015-07-17 14:16:22 +00:00
|
|
|
use foo::MyEnum::Result;
|
|
|
|
use foo::NoResult; // Through a re-export
|
|
|
|
|
|
|
|
mod foo {
|
|
|
|
pub use self::MyEnum::NoResult;
|
|
|
|
|
2015-11-24 00:36:12 +00:00
|
|
|
pub enum MyEnum {
|
2015-07-17 14:16:22 +00:00
|
|
|
Result,
|
|
|
|
NoResult
|
|
|
|
}
|
|
|
|
|
|
|
|
fn new() -> NoResult<MyEnum, String> {
|
2016-11-30 22:35:25 +00:00
|
|
|
//~^ ERROR expected type, found variant `NoResult`
|
2015-07-17 14:16:22 +00:00
|
|
|
unimplemented!()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
mod bar {
|
|
|
|
use foo::MyEnum::Result;
|
|
|
|
use foo;
|
|
|
|
|
|
|
|
fn new() -> Result<foo::MyEnum, String> {
|
2016-11-30 22:35:25 +00:00
|
|
|
//~^ ERROR expected type, found variant `Result`
|
2015-07-17 14:16:22 +00:00
|
|
|
unimplemented!()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn new() -> Result<foo::MyEnum, String> {
|
2016-11-30 22:35:25 +00:00
|
|
|
//~^ ERROR expected type, found variant `Result`
|
2015-07-17 14:16:22 +00:00
|
|
|
unimplemented!()
|
|
|
|
}
|
|
|
|
|
|
|
|
fn newer() -> NoResult<foo::MyEnum, String> {
|
2016-11-30 22:35:25 +00:00
|
|
|
//~^ ERROR expected type, found variant `NoResult`
|
2015-07-17 14:16:22 +00:00
|
|
|
unimplemented!()
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let _ = new();
|
|
|
|
}
|