mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-02 04:57:35 +00:00
14 lines
210 B
Rust
14 lines
210 B
Rust
![]() |
// check-pass
|
||
|
|
||
|
#![feature(derive_const)]
|
||
|
#![feature(const_trait_impl)]
|
||
|
|
||
|
#[derive_const(PartialEq)]
|
||
|
pub struct Reverse<T>(T);
|
||
|
|
||
|
const fn foo(a: Reverse<i32>, b: Reverse<i32>) -> bool {
|
||
|
a == b
|
||
|
}
|
||
|
|
||
|
fn main() {}
|