]>
git.proxmox.com Git - rustc.git/blob - src/test/ui/const-generics/generic_const_exprs/issue-85848.rs
1 #![feature(const_fn_trait_bound, generic_const_exprs)]
2 #![allow(incomplete_features)]
5 const does_contain
: bool
;
8 trait Contains
<T
, const Satisfied
: bool
> {}
12 impl<T
, U
> Delegates
<U
> for T
where T
: Contains
<U
, true> {}
14 const fn contains
<A
, B
>() -> bool
21 impl<T
, U
> Contains
<T
, { contains::<T, U>() }
> for U
where T
: _Contains
<U
> {}
23 fn writes_to_path
<C
>(cap
: &C
) {
24 writes_to_specific_path(&cap
);
25 //~^ ERROR: the trait bound `(): _Contains<&C>` is not satisfied [E0277]
26 //~| ERROR: unconstrained generic constant
29 fn writes_to_specific_path
<C
: Delegates
<()>>(cap
: &C
) {}