Skip to content

Fix: Resolve HIR display length issues and improve adjustment tooltips #20031

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

jnyfah
Copy link
Contributor

@jnyfah jnyfah commented Jun 18, 2025

  • Added detailed, tooltips for adjustment hints
  • Implemented custom format_function_hint function that includes function parameters for closing_braces and respects maximum length constraints by truncating parameter lists when needed

@jnyfah jnyfah changed the title format function Fix: Resolve HIR display length issues and improve adjustment tooltips Jun 18, 2025
@jnyfah jnyfah marked this pull request as ready for review June 18, 2025 09:44
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 18, 2025
Comment on lines +208 to +210
coercion.chars().next().unwrap().to_uppercase().collect::<String>()
+ &coercion[1..],
detailed_tooltip
Copy link
Member

Choose a reason for hiding this comment

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

let's just manually uppercase the string literal instead of doing this

@@ -156,6 +156,47 @@ pub(super) fn hints(
None
}

fn format_function_hint(func: &ast::Fn, max_length: usize) -> Option<String> {
Copy link
Member

Choose a reason for hiding this comment

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

Imo we should do this as described in my comment in #19207 (comment) instead

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.

3 participants