Overflow with use of Self in inherent impl on trait
8e38268
Opened by Deleted user at
Code: http://is.gd/zUrIKd
pub trait NBTTypeHelper where Self: NBTType {
type Tagtype = Self;
}
pub trait NBTType {
}
impl NBTTypeHelper for NBTType {
type Tagtype = <Self as NBTTypeHelper>::Tagtype;
}
fn main() {}
No, I think it is dupe.
Deleted user at 2015-05-02 09:43:44
I was think it same as #23305 Could someone change the bad title?
Deleted user at 2015-06-25 04:53:46
Still an issue.
Andrew Paseltiner at 2015-10-27 18:20:10
Still an issue, updated playpen
Jason Fager at 2017-03-21 16:12:45
Triage: still reproduces today
Steve Klabnik at 2019-12-25 16:13:54
Triage: no change
up-to-date repro:
#![feature(associated_type_defaults)] pub trait NBTTypeHelper where Self: NBTType { type Tagtype = Self; } pub trait NBTType { } impl NBTTypeHelper for dyn NBTType { type Tagtype = <Self as NBTTypeHelper>::Tagtype; } fn main() {}Maayan Hanin at 2022-10-17 19:15:07