Rustdoc cannot infer type when using type_alias_impl_trait, while rustc works · Issue #65863 · rust-lang/rust (original) (raw)
Navigation Menu
- Explore
- Pricing
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
Appearance settings
Description
#![feature(type_alias_impl_trait)]
pub trait Backend {}
impl Backend for () {}
pub struct Module(T);
pub type BackendImpl = impl Backend;
pub fn make_module() -> Module { 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