diff --git a/tests/ui/generic-const-items/assoc-const-bindings.rs b/tests/ui/generic-const-items/assoc-const-bindings.rs index 2bf4bea16debb..c187c87c7763e 100644 --- a/tests/ui/generic-const-items/assoc-const-bindings.rs +++ b/tests/ui/generic-const-items/assoc-const-bindings.rs @@ -1,35 +1,33 @@ //@ check-pass #![feature(generic_const_items, min_generic_const_args)] -#![feature(adt_const_params)] -#![allow(incomplete_features)] +#![feature(adt_const_params, unsized_const_params, generic_const_parameter_types)] +#![expect(incomplete_features)] + +use std::marker::{ConstParamTy, ConstParamTy_}; trait Owner { type const C: u32; type const K: u32; - // #[type_const] - // const Q: Maybe; + type const Q: Maybe; } impl Owner for () { type const C: u32 = N; type const K: u32 = const { 99 + 1 }; - // FIXME(mgca): re-enable once we properly support ctors and generics on paths - // #[type_const] - // const Q: Maybe = Maybe::Nothing; + type const Q: Maybe = Maybe::Nothing::; } fn take0(_: impl Owner = { N }>) {} fn take1(_: impl Owner = 100>) {} -// FIXME(mgca): re-enable once we properly support ctors and generics on paths -// fn take2(_: impl Owner = { Maybe::Just(()) }>) {} +fn take2(_: impl Owner = { Maybe::Just::<()>(()) }>) {} fn main() { take0::<128>(()); take1(()); } -#[derive(PartialEq, Eq, std::marker::ConstParamTy)] +#[derive(PartialEq, Eq, ConstParamTy)] enum Maybe { Nothing, Just(T),