-
-
Notifications
You must be signed in to change notification settings - Fork 14.5k
Open
Labels
C-bugCategory: This is a bug.Category: This is a bug.F-min_generic_const_args`#![feature(min_generic_const_args)]``#![feature(min_generic_const_args)]`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.T-typesRelevant to the types team, which will review and decide on the PR/issue.Relevant to the types team, which will review and decide on the PR/issue.
Description
Uplifted from #150843 (comment), #150843 (comment). Follow links for further details. Credits to @BoxyUwU.
Example reproducers:
RHS is a const param.
//@ known-bug: unknown
//@ check-pass
#![feature(min_generic_const_args)]
#![expect(incomplete_features)]
trait Trait { #[type_const] const CT: bool; }
fn f<const N: i32>(_: impl Trait<CT = { N }>) {} // FIXME: this should yield a type mismatch (`bool` v `i32`)RHS is a const param.
//@ known-bug: unknown
//@ check-pass
#![feature(min_generic_const_args)]
#![expect(incomplete_features)]
trait Trait { #[type_const] const CT: bool; }
fn f<const N: i32>() {
let _: dyn Trait<CT = { N }>; // FIXME: this should yield a type mismatch (`bool` v `i32`)
}RHS is a (normalizable) const projection (that doesn't contain any generic params).
//@ known-bug: unknown
//@ check-pass
#![feature(min_generic_const_args)]
#![expect(incomplete_features)]
trait Trait { #[type_const] const CT: bool; }
trait Bound { #[type_const] const N: u32; }
impl Bound for () { #[type_const] const N: u32 = 0; }
fn f() { let _: dyn Trait<CT = { <() as Bound>::N }>; } // FIXME
fn g(_: impl Trait<CT = { <() as Bound>::N }>) {} // FIXMEReactions are currently unavailable
Metadata
Metadata
Assignees
Labels
C-bugCategory: This is a bug.Category: This is a bug.F-min_generic_const_args`#![feature(min_generic_const_args)]``#![feature(min_generic_const_args)]`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.T-typesRelevant to the types team, which will review and decide on the PR/issue.Relevant to the types team, which will review and decide on the PR/issue.
Type
Projects
Status
To Do