Closed
Description
openedon Oct 27, 2019
#![feature(type_alias_impl_trait)]
pub trait Backend {}
impl Backend for () {}
pub struct Module<T>(T);
pub type BackendImpl = impl Backend;
pub fn make_module() -> Module<BackendImpl> {
Module(())
}
$ rustc -V
rustc 1.38.0 (625451e37 2019-09-23)
$ cargo doc
error[E0282]: type annotations needed
--> src/main.rs:13:1
|
13 | pub type BackendImpl = impl Backend<Product: std::any::Any>;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot infer type
error: aborting due to previous error
$ cargo build
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Metadata
Assignees
Labels
Type
Projects
Status
Done