mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 22:01:37 +00:00
Fix incorrect newline emission in Attrs::docs
This commit is contained in:
parent
ec824a92d0
commit
5734b347dd
4 changed files with 80 additions and 62 deletions
|
@ -53,15 +53,15 @@ pub fn call_info(db: &RootDatabase, position: FilePosition) -> Option<CallInfo>
|
|||
|
||||
match callable.kind() {
|
||||
hir::CallableKind::Function(func) => {
|
||||
res.doc = func.docs(db).map(|it| it.as_str().to_string());
|
||||
res.doc = func.docs(db).map(|it| it.into());
|
||||
format_to!(res.signature, "fn {}", func.name(db));
|
||||
}
|
||||
hir::CallableKind::TupleStruct(strukt) => {
|
||||
res.doc = strukt.docs(db).map(|it| it.as_str().to_string());
|
||||
res.doc = strukt.docs(db).map(|it| it.into());
|
||||
format_to!(res.signature, "struct {}", strukt.name(db));
|
||||
}
|
||||
hir::CallableKind::TupleEnumVariant(variant) => {
|
||||
res.doc = variant.docs(db).map(|it| it.as_str().to_string());
|
||||
res.doc = variant.docs(db).map(|it| it.into());
|
||||
format_to!(
|
||||
res.signature,
|
||||
"enum {}::{}",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue