rust/tests/ui/rfc-2632-const-trait-impl/const_derives/derive-const-with-params.rs

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

14 lines
210 B
Rust
Raw Normal View History

// 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() {}