File tree 2 files changed +4
-5
lines changed
compiler/rustc_trait_selection/src/traits/error_reporting
2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -3959,6 +3959,10 @@ fn hint_missing_borrow<'tcx>(
3959
3959
found_node : Node < ' _ > ,
3960
3960
err : & mut Diagnostic ,
3961
3961
) {
3962
+ if matches ! ( found_node, Node :: TraitItem ( ..) ) {
3963
+ return ;
3964
+ }
3965
+
3962
3966
let found_args = match found. kind ( ) {
3963
3967
ty:: FnPtr ( f) => infcx. instantiate_binder_with_placeholders ( * f) . inputs ( ) . iter ( ) ,
3964
3968
kind => {
Original file line number Diff line number Diff line change @@ -30,11 +30,6 @@ LL | self.map(Insertable::values).unwrap_or_default()
30
30
found function signature `for<'a> fn(&'a _) -> _`
31
31
note: required by a bound in `Option::<T>::map`
32
32
--> $SRC_DIR/core/src/option.rs:LL:COL
33
- help: consider adjusting the signature so it does not borrow its argument
34
- |
35
- LL - fn values(&self) -> Self::Values;
36
- LL + fn values(self) -> Self::Values;
37
- |
38
33
39
34
error: aborting due to 2 previous errors
40
35
You can’t perform that action at this time.
0 commit comments