Skip to content

Commit ce413e0

Browse files
committed
save-analysis: tweak the type value for functions
1 parent 3110040 commit ce413e0

File tree

1 file changed

+2
-2
lines changed
  • src/librustc_save_analysis

1 file changed

+2
-2
lines changed

src/librustc_save_analysis/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -676,7 +676,7 @@ impl<'l, 'tcx: 'l> SaveContext<'l, 'tcx> {
676676
}
677677

678678
fn make_signature(decl: &ast::FnDecl, generics: &ast::Generics) -> String {
679-
let mut sig = String::new();
679+
let mut sig = "fn ".to_owned();
680680
if !generics.lifetimes.is_empty() || !generics.ty_params.is_empty() {
681681
sig.push('<');
682682
sig.push_str(&generics.lifetimes.iter()
@@ -696,7 +696,7 @@ fn make_signature(decl: &ast::FnDecl, generics: &ast::Generics) -> String {
696696
sig.push_str(&decl.inputs.iter().map(arg_to_string).collect::<Vec<_>>().join(", "));
697697
sig.push(')');
698698
match decl.output {
699-
ast::FunctionRetTy::Default(_) => {}
699+
ast::FunctionRetTy::Default(_) => sig.push_str(" -> ()"),
700700
ast::FunctionRetTy::Ty(ref t) => sig.push_str(&format!(" -> {}", ty_to_string(t))),
701701
}
702702

0 commit comments

Comments
 (0)