about summary refs log tree commit diff
path: root/src/utils.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils.rs')
-rw-r--r--src/utils.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/utils.rs b/src/utils.rs
index 2ede562e79d..2493c9a5c74 100644
--- a/src/utils.rs
+++ b/src/utils.rs
@@ -82,6 +82,14 @@ pub fn format_unsafety(unsafety: ast::Unsafety) -> &'static str {
 }
 
 #[inline]
+pub fn format_auto(is_auto: ast::IsAuto) -> &'static str {
+    match is_auto {
+        ast::IsAuto::Yes => "auto ",
+        ast::IsAuto::No => "",
+    }
+}
+
+#[inline]
 pub fn format_mutability(mutability: ast::Mutability) -> &'static str {
     match mutability {
         ast::Mutability::Mutable => "mut ",