1
Fork 0
rust/src/test/ui/consts/const-block-const-bound.rs

18 lines
328 B
Rust
Raw Normal View History

2022-01-14 03:39:29 -08:00
#![allow(unused)]
#![feature(const_fn_trait_bound, const_trait_impl, inline_const)]
const fn f<T: ~const Drop>(x: T) {}
struct UnconstDrop;
impl Drop for UnconstDrop {
fn drop(&mut self) {}
}
fn main() {
const {
f(UnconstDrop);
//~^ ERROR the trait bound `UnconstDrop: Drop` is not satisfied
}
}