Open
Description
A question about impl Trait in trait type aliases: has any thought been given about how they should handle defaults?
I'm trying to do something like this, without success:
#![feature(type_alias_impl_trait, associated_type_defaults)]
use std::fmt::Debug;
struct Foo {
}
trait Bar {
type T: Debug = impl Debug;
fn bar() -> Self::T {
()
}
}
impl Bar for Foo {
type T = impl Debug;
fn bar() -> Self::T {
()
}
}
I'd guess this just hasn't been RFC'd yes, but does someone know if thought on the topic have already started?
Originally posted by @Ekleog in #63063 (comment)
Metadata
Metadata
Assignees
Labels
Category: A feature request, i.e: not implemented / a PR.`#![feature(associated_type_defaults)]``#[feature(type_alias_impl_trait)]`Relevant to the language teamThis change is large or controversial enough that it should have an RFC accepted before doing it.This issue requires a nightly compiler in some way.
Type
Projects
Status
Can do after stabilization