2020-09-26 16:20:14 -05:00
|
|
|
error[E0599]: the method `is_subset` exists for reference `&HashSet<T>`, but its trait bounds were not satisfied
|
2021-10-13 11:07:22 -05:00
|
|
|
--> $DIR/issue-35677.rs:7:10
|
2018-12-12 17:58:27 -06:00
|
|
|
|
|
2019-02-11 04:58:56 -06:00
|
|
|
LL | this.is_subset(other)
|
2020-09-26 16:20:14 -05:00
|
|
|
| ^^^^^^^^^ method cannot be called on `&HashSet<T>` due to unsatisfied trait bounds
|
2018-12-12 17:58:27 -06:00
|
|
|
|
|
2020-09-26 16:20:14 -05:00
|
|
|
= note: the following trait bounds were not satisfied:
|
2020-09-02 02:40:56 -05:00
|
|
|
`T: Eq`
|
2023-01-12 13:53:01 -06:00
|
|
|
`T: PartialEq`
|
|
|
|
which is required by `T: Eq`
|
2020-09-02 02:40:56 -05:00
|
|
|
`T: Hash`
|
2021-10-13 11:07:22 -05:00
|
|
|
help: consider restricting the type parameters to satisfy the trait bounds
|
|
|
|
|
|
2023-01-13 14:50:34 -06:00
|
|
|
LL | fn is_subset<T>(this: &HashSet<T>, other: &HashSet<T>) -> bool where T: Eq, T: Hash {
|
|
|
|
| ++++++++++++++++++++
|
2018-12-12 17:58:27 -06:00
|
|
|
|
2018-12-16 11:23:27 -06:00
|
|
|
error: aborting due to previous error
|
2018-12-12 17:58:27 -06:00
|
|
|
|
2018-12-16 11:23:27 -06:00
|
|
|
For more information about this error, try `rustc --explain E0599`.
|