diff options
| author | Keegan McAllister <kmcallister@mozilla.com> | 2015-01-01 16:37:47 -0800 |
|---|---|---|
| committer | Keegan McAllister <kmcallister@mozilla.com> | 2015-01-05 18:21:13 -0800 |
| commit | 0816255c80ee3f2a8870ee5e4379e3739d8ed72e (patch) | |
| tree | 32b71b7a4d5f22d8b7ec66a64373acd08e258d5e /src/libsyntax/ext/tt | |
| parent | 60be2f52d2434dfbf2df7728454d572d76f58bf8 (diff) | |
| download | rust-0816255c80ee3f2a8870ee5e4379e3739d8ed72e.tar.gz rust-0816255c80ee3f2a8870ee5e4379e3739d8ed72e.zip | |
Move #[macro_reexport] to extern crate
Diffstat (limited to 'src/libsyntax/ext/tt')
| -rw-r--r-- | src/libsyntax/ext/tt/reexport.rs | 41 |
1 files changed, 0 insertions, 41 deletions
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 <LICENSE-APACHE or -// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license -// <LICENSE-MIT or http://opensource.org/licenses/MIT>, 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<String> { - let usage = "malformed macro_reexport attribute, expected \ - #![macro_reexport(ident, ident, ...)]"; - - let mut reexported: Vec<String> = 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 -} |
