2025-01-22 06:40:43 +00:00
|
|
|
//@ revisions: current next
|
|
|
|
|
//@[next] compile-flags: -Znext-solver
|
|
|
|
|
//@ ignore-compare-mode-next-solver (explicit revisions)
|
|
|
|
|
|
|
|
|
|
fn equal<T>(a: &T, b: &T) -> bool
|
|
|
|
|
where
|
|
|
|
|
T: Eq,
|
|
|
|
|
{
|
|
|
|
|
a == b
|
|
|
|
|
}
|
2014-08-11 09:32:26 -07:00
|
|
|
|
|
|
|
|
struct Struct;
|
|
|
|
|
|
|
|
|
|
fn main() {
|
2014-08-11 17:12:01 -07:00
|
|
|
drop(equal(&Struct, &Struct))
|
2020-09-02 10:40:56 +03:00
|
|
|
//~^ ERROR the trait bound `Struct: Eq` is not satisfied
|
2014-08-11 09:32:26 -07:00
|
|
|
}
|