Skip to content

Overflow with use of Self in inherent impl on trait #25050

Open
@ghost

Description

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() {}

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.F-associated_type_defaults`#![feature(associated_type_defaults)]`T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions