Skip to content
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

Add config for disabling hover memory layout data #14758

Merged
merged 3 commits into from
May 7, 2023

Conversation

lumenian
Copy link
Contributor

@lumenian lumenian commented May 7, 2023

Requested in #14748 (comment)

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 7, 2023
hover_links_enable: bool = "true",
/// Whether to show memory layout data on hover.
hover_memory_layout_enable: bool = "true",
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
hover_memory_layout_enable: bool = "true",
hover_memoryLayout_enable: bool = "true",

Let's treat this as one thing

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Makes sense, thank you. Fixed it.

} else {
def.display(db).to_string()
let label = match value_extractor(&def) {
Some(value) if config.memory_layout => format!("{} // {value}", def.display(db)),
Copy link
Member

Choose a reason for hiding this comment

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

Unfortunately closure hover doesn't use label_and_layout_info_and_docs, but it shows some layout info which needs to be disabled.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you, I missed that closures use a different implementation.
I've added an additional test for closures.

@HKalbasi
Copy link
Member

HKalbasi commented May 7, 2023

@bors r+

@bors
Copy link
Collaborator

bors commented May 7, 2023

📌 Commit 8e1ba7f has been approved by HKalbasi

It is now in the queue for this repository.

@bors
Copy link
Collaborator

bors commented May 7, 2023

⌛ Testing commit 8e1ba7f with merge 833d530...

@bors
Copy link
Collaborator

bors commented May 7, 2023

☀️ Test successful - checks-actions
Approved by: HKalbasi
Pushing 833d530 to master...

@bors bors merged commit 833d530 into rust-lang:master May 7, 2023
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.

5 participants