From e8ca19da244e2dce17c599fd35565f6e47ff19e9 Mon Sep 17 00:00:00 2001 From: llogiq Date: Mon, 1 Jun 2015 22:36:56 +0200 Subject: [PATCH] fixed modules/visibility --- src/lib.rs | 1 + src/utils.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index 37cdf6a9c..06922ef56 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -26,6 +26,7 @@ pub mod mut_mut; pub mod len_zero; pub mod attrs; pub mod collapsible_if; +pub mod utils; #[plugin_registrar] pub fn plugin_registrar(reg: &mut Registry) { diff --git a/src/utils.rs b/src/utils.rs index e6e0c0e48..c67ded3d9 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -1,7 +1,7 @@ use rustc::lint::Context; use syntax::codemap::ExpnInfo; -fn in_macro(cx: &Context, opt_info: Option<&ExpnInfo>) -> bool { +pub fn in_macro(cx: &Context, opt_info: Option<&ExpnInfo>) -> bool { opt_info.map_or(false, |info| { info.callee.span.map_or(true, |span| { cx.sess().codemap().span_to_snippet(span).ok().map_or(true, |code|