mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-11 08:05:12 +00:00
14 lines
290 B
Rust
14 lines
290 B
Rust
//@ check-pass
|
|
|
|
#![allow(incomplete_features)]
|
|
#![feature(generic_const_exprs)]
|
|
|
|
pub struct Assert<const COND: bool>();
|
|
pub trait IsTrue {}
|
|
impl IsTrue for Assert<true> {}
|
|
|
|
pub trait IsNotZST {}
|
|
impl<T> IsNotZST for T where Assert<{ std::mem::size_of::<T>() > 0 }>: IsTrue {}
|
|
|
|
fn main() {}
|