mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-26 11:59:49 +00:00
start hovering default values of generic constants
This commit is contained in:
parent
d548146c30
commit
fec5ff9890
2 changed files with 49 additions and 1 deletions
|
@ -366,6 +366,11 @@ fn write_generic_params(
|
|||
delim(f)?;
|
||||
write!(f, "const {}: ", name.display(f.db.upcast()))?;
|
||||
c.ty.hir_fmt(f)?;
|
||||
|
||||
if let Some(default) = &c.default {
|
||||
f.write_str(" = ")?;
|
||||
write!(f, "{}", default.display(f.db.upcast()))?;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue