Commit f71e804
committed
fix: no suggest ref match when expected generic ref
Example
---
```rust
fn foo<T>(s: &T) {}
fn main() {
let ssss = &mut 2i32;
foo($0);
}
```
**Before this PR**
```text
lc ssss &mut i32 [type_could_unify+local]
lc &ssss [type+local]
md core:: []
fn foo(…) fn(&T) []
fn &foo(…) [type]
fn main() fn() []
fn &main() [type]
```
**After this PR**
```text
lc ssss &mut i32 [type_could_unify+local]
md core:: []
fn foo(…) fn(&T) []
fn &foo(…) [type]
fn main() fn() []
fn &main() [type]
```1 parent ce81cf6 commit f71e804
1 file changed
Lines changed: 22 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
717 | 717 | | |
718 | 718 | | |
719 | 719 | | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
720 | 723 | | |
721 | 724 | | |
722 | 725 | | |
723 | | - | |
724 | | - | |
725 | | - | |
| 726 | + | |
726 | 727 | | |
727 | 728 | | |
728 | 729 | | |
| |||
2976 | 2977 | | |
2977 | 2978 | | |
2978 | 2979 | | |
| 2980 | + | |
| 2981 | + | |
| 2982 | + | |
| 2983 | + | |
| 2984 | + | |
| 2985 | + | |
| 2986 | + | |
| 2987 | + | |
| 2988 | + | |
| 2989 | + | |
| 2990 | + | |
| 2991 | + | |
| 2992 | + | |
| 2993 | + | |
| 2994 | + | |
| 2995 | + | |
| 2996 | + | |
| 2997 | + | |
2979 | 2998 | | |
2980 | 2999 | | |
2981 | 3000 | | |
| |||
0 commit comments