rust/tests/ui/dropck/unconstrained_const_param_on_drop.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

8 lines
244 B
Rust
Raw Permalink Normal View History

2024-07-01 14:39:48 -05:00
struct Foo {}
impl<const UNUSED: usize> Drop for Foo {}
2024-07-01 15:43:00 -05:00
//~^ 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
2024-07-01 14:39:48 -05:00
fn main() {}