Skip to content

#[const_trait] and super trait error #100222

New issue

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

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

Already on GitHub? # to your account

Closed
fee1-dead opened this issue Aug 7, 2022 · 0 comments · Fixed by #100336
Closed

#[const_trait] and super trait error #100222

fee1-dead opened this issue Aug 7, 2022 · 0 comments · Fixed by #100336
Assignees
Labels
C-bug Category: This is a bug.

Comments

@fee1-dead
Copy link
Member

I tried this code:

#![feature(const_trait_impl)]

#[const_trait]
pub trait Index {
    type Output;
}

#[const_trait]
pub trait IndexMut: Index {
    fn foo(&mut self) -> <Self as Index>::Output;
}

I expected to see this happen: compiles
Instead, this happened: errors

Meta

latest nightly

@fee1-dead fee1-dead added the C-bug Category: This is a bug. label Aug 7, 2022
@fee1-dead fee1-dead self-assigned this Aug 7, 2022
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this issue Aug 22, 2022
…it, r=oli-obk

Fix two const_trait_impl issues

r? `@oli-obk`

Fixes rust-lang#100222.
Fixes rust-lang#100543.
@bors bors closed this as completed in 14c8a68 Aug 22, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
C-bug Category: This is a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant