-
-
Notifications
You must be signed in to change notification settings - Fork 15k
Wrong suggestion for const well-formedness of bool #122395
Copy link
Copy link
Closed
Labels
A-const-genericsArea: const generics (parameters and arguments)Area: const generics (parameters and arguments)A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsF-generic_const_exprs`#![feature(generic_const_exprs)]``#![feature(generic_const_exprs)]`T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
Metadata
Metadata
Assignees
Labels
A-const-genericsArea: const generics (parameters and arguments)Area: const generics (parameters and arguments)A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsF-generic_const_exprs`#![feature(generic_const_exprs)]``#![feature(generic_const_exprs)]`T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Code
https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021&gist=6c33a1495d719fbc2d8efe30177c3ca4
Current output
Desired output
`where [(); !N as usize]:`Rationale and extra context
The well-formedness shouldn't be written as
where [(); {!N}]:when!Nis a bool, which doesn't compile. Should cast it to an integral type.Other cases
No response
Rust Version
Anything else?
No response