rust/tests/ui/dropck/unconstrained_const_param_on_drop.rs
2024-07-02 02:30:38 +01:00

8 lines
244 B
Rust

struct Foo {}
impl<const UNUSED: usize> Drop for Foo {}
//~^ ERROR: `Drop` impl requires `the constant `_` has type `usize``
//~| ERROR: the const parameter `UNUSED` is not constrained by the impl trait, self type, or predicates
fn main() {}