#![feature(generic_const_items)] #![allow(incomplete_features)] // Ensure that we check if bounds on const items hold or not. use std::convert::Infallible; const C: () = (); const K: () = () where Infallible: From; trait Trait

{ const A: u32 where P: Copy; const B: u32 where Infallible: From; } impl

Trait

for () { const A: u32 = 0; const B: u32 = 1; } fn main() { let () = C::; //~ ERROR the trait bound `String: Copy` is not satisfied let () = K::<()>; //~ ERROR the trait bound `Infallible: From<()>` is not satisfied let _ = <() as Trait>>::A; //~ ERROR the trait bound `Vec: Copy` is not satisfied let _ = <() as Trait<&'static str>>::B::<()>; //~ ERROR the trait bound `Infallible: From<()>` is not satisfied }