From 0816255c80ee3f2a8870ee5e4379e3739d8ed72e Mon Sep 17 00:00:00 2001 From: Keegan McAllister Date: Thu, 1 Jan 2015 16:37:47 -0800 Subject: Move #[macro_reexport] to extern crate --- src/libsyntax/ext/tt/reexport.rs | 41 ---------------------------------------- 1 file changed, 41 deletions(-) delete mode 100644 src/libsyntax/ext/tt/reexport.rs (limited to 'src/libsyntax/ext/tt') diff --git a/src/libsyntax/ext/tt/reexport.rs b/src/libsyntax/ext/tt/reexport.rs deleted file mode 100644 index 104f3787253..00000000000 --- a/src/libsyntax/ext/tt/reexport.rs +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2014 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -//! Defines the crate attribute syntax for macro re-export. - -use ast; -use attr::AttrMetaMethods; -use diagnostic::SpanHandler; - -/// Return a vector of the names of all macros re-exported from the crate. -pub fn gather(diag: &SpanHandler, krate: &ast::Crate) -> Vec { - let usage = "malformed macro_reexport attribute, expected \ - #![macro_reexport(ident, ident, ...)]"; - - let mut reexported: Vec = vec!(); - for attr in krate.attrs.iter() { - if !attr.check_name("macro_reexport") { - continue; - } - - match attr.meta_item_list() { - None => diag.span_err(attr.span, usage), - Some(list) => for mi in list.iter() { - match mi.node { - ast::MetaWord(ref word) - => reexported.push(word.to_string()), - _ => diag.span_err(mi.span, usage), - } - } - } - } - - reexported -} -- cgit 1.4.1-3-g733a5