rust/tests/ui/rfc-2632-const-trait-impl/call-generic-method-fail.rs

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

9 lines
145 B
Rust
Raw Normal View History

#![feature(const_trait_impl)]
2021-08-25 09:30:09 -05:00
pub const fn equals_self<T: PartialEq>(t: &T) -> bool {
*t == *t
//~^ ERROR can't compare
}
fn main() {}