Add debug logging to fn-related functions

This commit is contained in:
Ivan Molodetskikh
2018-08-31 16:52:45 +03:00
parent 430f848c75
commit 05b6aaa130
+4
View File
@@ -298,6 +298,8 @@ fn format_function_type<'a, I>(
<I as Iterator>::Item: Deref,
<I::Item as Deref>::Target: Rewrite + Spanned + 'a,
{
debug!("format_function_type {:#?}", shape);
// Code for handling variadics is somewhat duplicated for items, but they
// are different enough to need some serious refactoring to share code.
enum ArgumentKind<T>
@@ -706,6 +708,8 @@ fn rewrite_bare_fn(
context: &RewriteContext,
shape: Shape,
) -> Option<String> {
debug!("rewrite_bare_fn {:#?}", shape);
let mut result = String::with_capacity(128);
if let Some(ref lifetime_str) = rewrite_lifetime_param(context, shape, &bare_fn.generic_params)