// Check that evaluation of needs_drop fails when T is not monomorphic. #![feature(generic_const_exprs)] #![allow(const_evaluatable_unchecked)] #![allow(incomplete_features)] struct Bool {} impl Bool { fn assert() {} } fn f() { Bool::<{ std::mem::needs_drop::() }>::assert(); //~^ ERROR no function or associated item named `assert` found //~| ERROR unconstrained generic constant } fn main() { f::(); }