Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ghost opened this issue May 2, 2015 · 6 comments
Open

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

ghost opened this issue May 2, 2015 · 6 comments
Labels
C-bug Category: This is a bug. F-associated_type_defaults `#![feature(associated_type_defaults)]` T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@ghost
Copy link

ghost commented May 2, 2015

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() {}
@ghost
Copy link
Author

ghost commented May 2, 2015

No, I think it is dupe.

@ghost ghost closed this as completed May 2, 2015
@ghost ghost reopened this Jun 25, 2015
@ghost
Copy link
Author

ghost commented Jun 25, 2015

I was think it same as #23305
Could someone change the bad title?

@steveklabnik steveklabnik changed the title Another rustc stack overflow bug; Stack overflow with use of Self in inherent impl on trait Sep 3, 2015
@steveklabnik steveklabnik added the I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ label Sep 3, 2015
@apasel422
Copy link
Contributor

Still an issue.

@jfager
Copy link
Contributor

jfager commented Mar 21, 2017

Still an issue, updated playpen

@Mark-Simulacrum Mark-Simulacrum removed the I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ label Jun 13, 2017
@Mark-Simulacrum Mark-Simulacrum changed the title Stack overflow with use of Self in inherent impl on trait Overflow with use of Self in inherent impl on trait Jun 13, 2017
@Mark-Simulacrum Mark-Simulacrum added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Jun 23, 2017
@Mark-Simulacrum Mark-Simulacrum added the C-bug Category: This is a bug. label Jul 22, 2017
@steveklabnik
Copy link
Member

Triage: still reproduces today

@Spoonbender
Copy link

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

@Enselic Enselic added the F-associated_type_defaults `#![feature(associated_type_defaults)]` label May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. F-associated_type_defaults `#![feature(associated_type_defaults)]` T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

6 participants