]>
git.proxmox.com Git - rustc.git/blob - src/test/ui/type-alias-impl-trait/assoc-type-const.rs
1 // Tests that we properly detect defining usages when using
2 // const generics in an associated opaque type
5 // revisions: min_tait full_tait
6 #![feature(min_type_alias_impl_trait)]
7 #![cfg_attr(full_tait, feature(type_alias_impl_trait))]
8 //[full_tait]~^ WARN incomplete
9 #![feature(const_generics)]
10 //~^ WARN the feature `const_generics` is incomplete
12 trait UnwrapItemsExt
<'a
, const C
: usize> {
14 fn unwrap_items(self) -> Self::Iter
;
17 struct MyStruct
<const C
: usize> {}
19 trait MyTrait
<'a
, const C
: usize> {
21 const MY_CONST
: usize;
24 impl<'a
, const C
: usize> MyTrait
<'a
, C
> for MyStruct
<C
> {
26 const MY_CONST
: usize = C
;
29 impl<'a
, I
, const C
: usize> UnwrapItemsExt
<'a
, C
> for I
{
30 type Iter
= impl MyTrait
<'a
, C
>;
32 fn unwrap_items(self) -> Self::Iter
{