mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 12:29:21 +00:00
Ignore lifetime params in substitutions
This commit is contained in:
parent
10f6332831
commit
ae8a802085
3 changed files with 17 additions and 3 deletions
|
@ -856,7 +856,12 @@ impl<'a> InferenceContext<'a> {
|
|||
// handle provided type arguments
|
||||
if let Some(generic_args) = generic_args {
|
||||
// if args are provided, it should be all of them, but we can't rely on that
|
||||
for arg in generic_args.args.iter().take(type_params) {
|
||||
for arg in generic_args
|
||||
.args
|
||||
.iter()
|
||||
.filter(|arg| matches!(arg, GenericArg::Type(_)))
|
||||
.take(type_params)
|
||||
{
|
||||
match arg {
|
||||
GenericArg::Type(type_ref) => {
|
||||
let ty = self.make_ty(type_ref);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue