Skip to content

Conversation

@ShoyuVanilla
Copy link
Member

Fixes #17811

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 8, 2024
let (fn_params, other) =
parameters.split_at(self_param as usize + type_ + const_ + lifetime);
let (_impl, parent_params) = other.split_at(impl_);
let (fn_params, parent_params) = parameters.split_at(without_impl + impl_);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as generic_args is self + type params + const params + lifetimes + hidden generic with impl trait args, we should include impl to generate generic_args_sans_defaults

let fn_params =
generic_args_sans_defaults(f, Some(generic_def_id), fn_params);
&generic_args_sans_defaults(f, Some(generic_def_id), fn_params)
[0..without_impl];
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And we exclude impl trait things here

@ShoyuVanilla ShoyuVanilla changed the title fix: Panic while rendering function with impl trait arg fix: Panic while rendering function type hint with impl trait arg Aug 8, 2024
@Veykril
Copy link
Member

Veykril commented Aug 8, 2024

Thanks!
@bors r+

@bors
Copy link
Contributor

bors commented Aug 8, 2024

📌 Commit aa62c9d has been approved by Veykril

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Aug 8, 2024

⌛ Testing commit aa62c9d with merge dab022f...

@bors
Copy link
Contributor

bors commented Aug 8, 2024

☀️ Test successful - checks-actions
Approved by: Veykril
Pushing dab022f to master...

@bors bors merged commit dab022f into rust-lang:master Aug 8, 2024
@ShoyuVanilla ShoyuVanilla deleted the issue-17811 branch August 8, 2024 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Building hover information for fn pointers from generic with impl args panics.

4 participants