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

impl Drop return type results in impl Sized #16338

Open
Veykril opened this issue Jan 10, 2024 · 2 comments
Open

impl Drop return type results in impl Sized #16338

Veykril opened this issue Jan 10, 2024 · 2 comments
Labels
A-ty type system / type inference / traits / method resolution C-bug Category: bug

Comments

@Veykril
Copy link
Member

Veykril commented Jan 10, 2024

fn impl_drop() -> impl Drop {
    let rec = impl_drop(); // incorrectly renders `impl Sized` in the hint
}

fn impl_sized() -> impl Sized {
    let rec = impl_sized(); // correctly renders `impl Sized` in the hint
}

fn impl_copy() -> impl Copy {
    let rec = impl_copy(); // correctly renders `impl Copy` in the hint
}
@Veykril Veykril added A-ty type system / type inference / traits / method resolution C-bug Category: bug labels Jan 10, 2024
@flodiebold
Copy link
Member

I think we have some hack to ignore Drop bounds, this might be a side effect.

@ShoyuVanilla
Copy link
Member

This is the side-effect of #11936 and I wonder whether that workaround is still needed since rustc removed impl ~const in rust-lang/rust/issues/110395

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-ty type system / type inference / traits / method resolution C-bug Category: bug
Projects
None yet
Development

No branches or pull requests

3 participants