mirror of
https://github.com/rust-lang/rust.git
synced 2025-06-05 03:38:29 +00:00
11 lines
257 B
Rust
11 lines
257 B
Rust
//@ compile-flags: -Znext-solver
|
|
#![allow(incomplete_features)]
|
|
#![feature(const_trait_impl, effects)]
|
|
|
|
pub const fn equals_self<T: PartialEq>(t: &T) -> bool {
|
|
*t == *t
|
|
//~^ ERROR cannot call non-const operator in constant functions
|
|
}
|
|
|
|
fn main() {}
|