#![feature(generic_const_exprs)] #![allow(incomplete_features)] trait _Contains { const does_contain: bool; } trait Contains {} trait Delegates {} impl Delegates for T where T: Contains {} const fn contains() -> bool where A: _Contains, { A::does_contain } impl Contains() }> for U where T: _Contains {} fn writes_to_path(cap: &C) { writes_to_specific_path(&cap); //~^ ERROR: the trait bound `(): _Contains<&C>` is not satisfied [E0277] //~| ERROR: unconstrained generic constant //~| ERROR: mismatched types [E0308] } fn writes_to_specific_path>(cap: &C) {} fn main() {}