2021-04-24 01:08:51 +00:00
|
|
|
error[E0599]: no method named `finish` found for struct `DefaultHasher` in the current scope
|
|
|
|
--> $DIR/import-trait-for-method-call.rs:6:7
|
|
|
|
|
|
|
|
|
LL | h.finish()
|
|
|
|
| ^^^^^^ method not found in `DefaultHasher`
|
2022-12-09 15:56:23 +00:00
|
|
|
--> $SRC_DIR/core/src/hash/mod.rs:LL:COL
|
2021-06-10 11:52:00 +00:00
|
|
|
|
|
2022-12-09 15:56:23 +00:00
|
|
|
= note: the method is available for `DefaultHasher` here
|
2021-04-24 01:08:51 +00:00
|
|
|
|
|
2021-04-24 01:12:54 +00:00
|
|
|
= help: items from traits can only be used if the trait is in scope
|
|
|
|
help: the following trait is implemented but not in scope; perhaps add a `use` for it:
|
|
|
|
|
|
2023-03-18 02:18:39 +00:00
|
|
|
LL + use std::hash::Hasher;
|
2021-04-24 01:12:54 +00:00
|
|
|
|
|
2021-04-24 01:08:51 +00:00
|
|
|
|
2021-05-02 00:18:04 +00:00
|
|
|
error[E0599]: the method `as_ref` exists for reference `&dyn Bar`, but its trait bounds were not satisfied
|
|
|
|
--> $DIR/import-trait-for-method-call.rs:15:7
|
|
|
|
|
|
|
|
|
LL | trait Bar {}
|
|
|
|
| --------- doesn't satisfy `dyn Bar: AsRef<_>`
|
|
|
|
...
|
|
|
|
LL | x.as_ref();
|
|
|
|
| ^^^^^^ method cannot be called on `&dyn Bar` due to unsatisfied trait bounds
|
|
|
|
|
|
|
|
|
= note: the following trait bounds were not satisfied:
|
|
|
|
`dyn Bar: AsRef<_>`
|
|
|
|
which is required by `&dyn Bar: AsRef<_>`
|
|
|
|
= help: items from traits can only be used if the trait is implemented and in scope
|
|
|
|
= note: the following trait defines an item `as_ref`, perhaps you need to implement it:
|
|
|
|
candidate #1: `AsRef`
|
|
|
|
|
|
|
|
error: aborting due to 2 previous errors
|
2021-04-24 01:08:51 +00:00
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0599`.
|