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

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

19 lines
356 B
Rust
Raw Permalink 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
= T::K where
T: Tr<()>;
//~^^^ ERROR where clauses are not allowed before const item bodies
trait Tr<P> {
const K: u64
= 0 where
P: Copy;
//~^^^ ERROR where clauses are not allowed before const item bodies
}
fn main() {}