mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
Put layout comment to the top of hovers
This commit is contained in:
parent
659d4f91e4
commit
cf905cff76
2 changed files with 108 additions and 57 deletions
|
@ -463,9 +463,9 @@ pub(super) fn definition(
|
|||
};
|
||||
|
||||
let label = match (value, layout_info) {
|
||||
(Some(value), Some(layout_info)) => format!("{label} = {value}{layout_info}"),
|
||||
(Some(value), Some(layout_info)) => format!("{layout_info}\n{label} = {value}"),
|
||||
(Some(value), None) => format!("{label} = {value}"),
|
||||
(None, Some(layout_info)) => format!("{label}{layout_info}"),
|
||||
(None, Some(layout_info)) => format!("{layout_info}\n{label}"),
|
||||
(None, None) => label,
|
||||
};
|
||||
|
||||
|
@ -617,8 +617,6 @@ fn render_memory_layout(
|
|||
offset: impl FnOnce(&Layout) -> Option<u64>,
|
||||
tag: impl FnOnce(&Layout) -> Option<usize>,
|
||||
) -> Option<String> {
|
||||
// field
|
||||
|
||||
let config = config?;
|
||||
let layout = layout().ok()?;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue