mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-01 06:51:58 +00:00
15 lines
439 B
Rust
15 lines
439 B
Rust
#![allow(incomplete_features)]
|
|
#![feature(generic_const_exprs)]
|
|
|
|
struct ConstAssert<const COND: bool>;
|
|
trait True {}
|
|
impl True for ConstAssert<true> {}
|
|
|
|
struct Range<T: PartialOrd, const MIN: T, const MAX: T>(T)
|
|
//~^ ERROR the type of const parameters must not depend on other generic parameters
|
|
//~| ERROR the type of const parameters must not depend on other generic parameters
|
|
where
|
|
ConstAssert<{ MIN <= MAX }>: True;
|
|
|
|
fn main() {}
|