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

const_trait_impl with associated types broken by effects, but now requires effects to be used in const fn #115189

Closed
maurer opened this issue Aug 24, 2023 · 1 comment
Labels
C-bug Category: This is a bug.

Comments

@maurer
Copy link
Contributor

maurer commented Aug 24, 2023

In current beta and beyond, #![feature(effects)] is required to use const_trait_impl in const fn contexts - #114808 .

However, turning on #![feature(effects)] with an output type on the trait yields an error about 'host' not being equal to 'true'

Without #![feature(effects)], this works on rust compilers 1.72 and earlier if unstable features are enabled.

@maurer maurer added the C-bug Category: This is a bug. label Aug 24, 2023
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Aug 24, 2023
@maurer
Copy link
Contributor Author

maurer commented Aug 25, 2023

The example is wrong and in fact shouldn't work (since it doesn't refer to a ~const bound). This was an attempt to reduce rust/kernel/driver.rs's IdArray::new to a code example, and I didn't do it right. Closing until I have a cleaner reproducer.

@maurer maurer closed this as completed Aug 25, 2023
@Noratrieb Noratrieb removed the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Sep 4, 2023
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.
Projects
None yet
Development

No branches or pull requests

3 participants