2014-01-28 00:20:50 +11:00
|
|
|
struct NoCloneOrEq;
|
|
|
|
|
|
2014-12-31 17:32:49 +13:00
|
|
|
#[derive(PartialEq)]
|
2014-01-28 00:20:50 +11:00
|
|
|
struct E {
|
2014-11-03 14:55:19 -05:00
|
|
|
x: NoCloneOrEq //~ ERROR binary operation `==` cannot be applied to type `NoCloneOrEq`
|
2014-01-28 00:20:50 +11:00
|
|
|
}
|
2014-12-31 17:32:49 +13:00
|
|
|
#[derive(Clone)]
|
2014-01-28 00:20:50 +11:00
|
|
|
struct C {
|
2014-11-03 12:51:21 -05:00
|
|
|
x: NoCloneOrEq
|
2020-09-02 10:40:56 +03:00
|
|
|
//~^ ERROR `NoCloneOrEq: Clone` is not satisfied
|
2014-01-28 00:20:50 +11:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fn main() {}
|