mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-14 02:49:40 +00:00
Recover trait import suggestion
This commit is contained in:
parent
862901781d
commit
64ee9cc28c
@ -1047,7 +1047,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
|
||||
}
|
||||
}
|
||||
}
|
||||
if !alt_rcvr_sugg && self.suggest_valid_traits(err, valid_out_of_scope_traits) {
|
||||
if self.suggest_valid_traits(err, valid_out_of_scope_traits) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -12,6 +12,7 @@ LL | fn finish(&self) -> u64;
|
||||
| the method is available for `Box<DefaultHasher>` here
|
||||
| the method is available for `Box<&mut DefaultHasher>` here
|
||||
|
|
||||
= help: items from traits can only be used if the trait is in scope
|
||||
help: consider wrapping the receiver expression with the appropriate type
|
||||
|
|
||||
LL | Box::new(h).finish()
|
||||
@ -20,6 +21,10 @@ help: consider wrapping the receiver expression with the appropriate type
|
||||
|
|
||||
LL | Box::new(&mut h).finish()
|
||||
| ^^^^^^^^^^^^^ ^
|
||||
help: the following trait is implemented but not in scope; perhaps add a `use` for it:
|
||||
|
|
||||
LL | use std::hash::Hasher;
|
||||
|
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user