rust/tests/ui/const-generics/issues/issue-70225.rs
2024-02-16 20:02:50 +00:00

20 lines
294 B
Rust

//@ check-pass
#![deny(dead_code)]
// We previously incorrectly linted `L` as unused here.
const L: usize = 3;
fn main() {
let p = Printer {};
p.print();
}
trait Print<const N: usize> {
fn print(&self) -> usize {
3
}
}
struct Printer {}
impl Print<L> for Printer {}