Open
Description
openedon Aug 25, 2017
Example (using an associated type that matches a blanket impl
):
trait Foo {
type X;
}
impl<T: ?Sized> Foo for T {
type X = ();
}
trait Bar {
// Note how this is allowed without a bound.
fn foo(&self) -> <Self as Foo>::X;
}
// error: the trait `Bar` cannot be made into an object
fn foo(_: Box<dyn Bar>) {}
fn main() {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Metadata
Assignees
Labels
Area: trait objects, vtable layoutArea: trait objects, vtable layoutArea: The type systemArea: The type systemCategory: This is a bug.Category: This is a bug.Relevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.Relevant to the types team, which will review and decide on the PR/issue.Relevant to the types team, which will review and decide on the PR/issue.