rust/tests/ui/generic-const-items/misplaced-where-clause.rs

21 lines
359 B
Rust
Raw Normal View History

2023-07-09 20:10:03 -05:00
// run-rustfix
#![feature(generic_const_items)]
#![allow(incomplete_features, dead_code)]
const K<T>: u64
where
T: Tr<()>
= T::K;
//~^^^ ERROR where clauses are not allowed before const item bodies
trait Tr<P> {
const K: u64
where
P: Copy
= 0;
//~^^^ ERROR where clauses are not allowed before const item bodies
}
fn main() {}