mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-28 14:03:35 +00:00
Fix unwanted leading whitespace in hover text
PR #16366 moved layout information to a separate line, so the leading whitespace is no longer necessary.
This commit is contained in:
parent
a2e274142f
commit
30d3d68044
2 changed files with 65 additions and 65 deletions
|
@ -510,7 +510,7 @@ fn render_notable_trait_comment(
|
|||
let mut needs_impl_header = true;
|
||||
for (trait_, assoc_types) in notable_traits {
|
||||
desc.push_str(if mem::take(&mut needs_impl_header) {
|
||||
" // Implements notable traits: "
|
||||
"// Implements notable traits: "
|
||||
} else {
|
||||
", "
|
||||
});
|
||||
|
@ -661,7 +661,7 @@ fn closure_ty(
|
|||
if let Some(layout) =
|
||||
render_memory_layout(config.memory_layout, || original.layout(sema.db), |_| None, |_| None)
|
||||
{
|
||||
format_to!(markup, "{layout}");
|
||||
format_to!(markup, " {layout}");
|
||||
}
|
||||
if let Some(trait_) = c.fn_trait(sema.db).get_id(sema.db, original.krate(sema.db).into()) {
|
||||
push_new_def(hir::Trait::from(trait_).into())
|
||||
|
@ -730,7 +730,7 @@ fn render_memory_layout(
|
|||
let config = config?;
|
||||
let layout = layout().ok()?;
|
||||
|
||||
let mut label = String::from(" // ");
|
||||
let mut label = String::from("// ");
|
||||
|
||||
if let Some(render) = config.size {
|
||||
let size = match tag(&layout) {
|
||||
|
|
Loading…
Reference in a new issue