diff options
| author | Esteban Küber <esteban@kuber.com.ar> | 2021-04-23 18:12:54 -0700 |
|---|---|---|
| committer | Esteban Küber <esteban@kuber.com.ar> | 2021-04-23 18:12:54 -0700 |
| commit | 64ee9cc28ceda652ac06b7d6bf68d1b7f408cf23 (patch) | |
| tree | 3204f93684fbd546e815189782b475b0a7c6c787 /src | |
| parent | 862901781d5980e7cd1865b6cd6d77760f4016ec (diff) | |
| download | rust-64ee9cc28ceda652ac06b7d6bf68d1b7f408cf23.tar.gz rust-64ee9cc28ceda652ac06b7d6bf68d1b7f408cf23.zip | |
Recover trait import suggestion
Diffstat (limited to 'src')
| -rw-r--r-- | src/test/ui/suggestions/import-trait-for-method-call.stderr | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/test/ui/suggestions/import-trait-for-method-call.stderr b/src/test/ui/suggestions/import-trait-for-method-call.stderr index 8b72e8c922c..b6fc09cc5d0 100644 --- a/src/test/ui/suggestions/import-trait-for-method-call.stderr +++ b/src/test/ui/suggestions/import-trait-for-method-call.stderr @@ -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 |
