-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Closed
Labels
A-impl-traitArea: `impl Trait`. Universally / existentially quantified anonymous types with static dispatch.Area: `impl Trait`. Universally / existentially quantified anonymous types with static dispatch.C-bugCategory: This is a bug.Category: This is a bug.F-type_alias_impl_trait`#[feature(type_alias_impl_trait)]``#[feature(type_alias_impl_trait)]`T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.requires-nightlyThis issue requires a nightly compiler in some way.This issue requires a nightly compiler in some way.
Description
While building, testing and running the below code works fine, cargo doc
fails with:
error[E0277]: the trait bound `(): D` is not satisfied
--> test_existential_doc_crash.rs:13:5
|
13 | existential type B: D;
| ^^^^^^^^^^^^^^^^^^^^^^ the trait `D` is not implemented for `()`
|
= note: the return type of a function must have a statically known size
#![feature(existential_type)]
pub trait A {
type B: D;
fn c() -> Self::B;
}
pub trait D {}
impl D for u8 {}
pub struct E;
impl A for E {
existential type B: D;
fn c() -> Self::B {
0u8
}
}
pwoolcoc
Metadata
Metadata
Assignees
Labels
A-impl-traitArea: `impl Trait`. Universally / existentially quantified anonymous types with static dispatch.Area: `impl Trait`. Universally / existentially quantified anonymous types with static dispatch.C-bugCategory: This is a bug.Category: This is a bug.F-type_alias_impl_trait`#[feature(type_alias_impl_trait)]``#[feature(type_alias_impl_trait)]`T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.requires-nightlyThis issue requires a nightly compiler in some way.This issue requires a nightly compiler in some way.
Type
Projects
Status
Done