Skip to content

Commit

Permalink
save-analysis: tweak the type value for functions
Browse files Browse the repository at this point in the history
  • Loading branch information
nrc committed Sep 7, 2016
1 parent 3110040 commit ce413e0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/librustc_save_analysis/lib.rs
Expand Up @@ -676,7 +676,7 @@ impl<'l, 'tcx: 'l> SaveContext<'l, 'tcx> {
}

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

Expand Down

0 comments on commit ce413e0

Please sign in to comment.