fn infer_async_ret_type() {
check_types(
r#"
-//- /main.rs crate:main deps:core
-
-enum Result<T, E> {
- Ok(T),
- Err(E),
-}
-
-use Result::*;
-
-
+//- minicore: future, result
struct Fooey;
impl Fooey {
// ^ u32
Ok(ret)
}
-
-//- /core.rs crate:core
-#[prelude_import] use future::*;
-mod future {
- #[lang = "future_trait"]
- trait Future {
- type Output;
- }
-}
"#,
);
}
//! pin:
//! future: pin
//! option:
+//! result:
pub mod marker {
// region:sized
}
// endregion:option
+// region:result
+pub mod result {
+ pub enum Result<T, E> {
+ #[lang = "Ok"]
+ Ok(T),
+ #[lang = "Err"]
+ Err(E),
+ }
+}
+// endregion:result
+
// region:pin
pub mod pin {
#[lang = "pin"]
pub mod prelude {
pub mod v1 {
- pub use crate::marker::Sized; // :sized
- pub use crate::option::Option::{self, None, Some}; // :option
+ pub use crate::{
+ marker::Sized, // :sized
+ option::Option::{self, None, Some}, // :option
+ result::Result::{self, Err, Ok}, // :result
+ };
}
pub mod rust_2015 {