From 32cb83985541ec78fc17185c0847facf2f5da2ec Mon Sep 17 00:00:00 2001 From: Nick Cameron Date: Fri, 6 Jan 2017 16:06:09 +1300 Subject: Macros in types are possible Fixes #1234 --- src/types.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/types.rs b/src/types.rs index f4f86f58815..c186e1ea324 100644 --- a/src/types.rs +++ b/src/types.rs @@ -642,12 +642,12 @@ impl Rewrite for ast::Ty { rewrite_bare_fn(bare_fn, self.span, context, width, offset) } ast::TyKind::Never => Some(String::from("!")), - ast::TyKind::Mac(..) | - ast::TyKind::Typeof(..) => unreachable!(), + ast::TyKind::Mac(..) => None, ast::TyKind::ImplicitSelf => Some(String::from("")), ast::TyKind::ImplTrait(ref it) => { it.rewrite(context, width, offset).map(|it_str| format!("impl {}", it_str)) } + ast::TyKind::Typeof(..) => unreachable!(), } } } -- cgit 1.4.1-3-g733a5