mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 15:23:46 +00:00
9 lines
184 B
Rust
9 lines
184 B
Rust
fn equal<T>(a: &T, b: &T) -> bool where T : Eq { a == b }
|
|
|
|
struct Struct;
|
|
|
|
fn main() {
|
|
drop(equal(&Struct, &Struct))
|
|
//~^ ERROR the trait bound `Struct: Eq` is not satisfied
|
|
}
|