diff options
Diffstat (limited to 'src/libsyntax/lib.rs')
| -rw-r--r-- | src/libsyntax/lib.rs | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/src/libsyntax/lib.rs b/src/libsyntax/lib.rs index 30fd23ea909..31370e2c92e 100644 --- a/src/libsyntax/lib.rs +++ b/src/libsyntax/lib.rs @@ -4,9 +4,7 @@ //! //! This API is completely unstable and subject to change. -#![doc(html_root_url = "https://doc.rust-lang.org/nightly/", - test(attr(deny(warnings))))] - +#![doc(html_root_url = "https://doc.rust-lang.org/nightly/", test(attr(deny(warnings))))] #![feature(bool_to_option)] #![feature(box_syntax)] #![feature(const_fn)] @@ -18,13 +16,12 @@ #![feature(try_trait)] #![feature(slice_patterns)] #![feature(unicode_internals)] +#![recursion_limit = "256"] -#![recursion_limit="256"] - +use ast::AttrId; pub use errors; use rustc_data_structures::sync::Lock; use rustc_index::bit_set::GrowableBitSet; -use ast::AttrId; use syntax_pos::edition::Edition; #[macro_export] @@ -34,7 +31,7 @@ macro_rules! unwrap_or { Some(x) => x, None => $default, } - } + }; } pub struct Globals { @@ -56,16 +53,16 @@ impl Globals { } pub fn with_globals<F, R>(edition: Edition, f: F) -> R - where F: FnOnce() -> R +where + F: FnOnce() -> R, { let globals = Globals::new(edition); - GLOBALS.set(&globals, || { - syntax_pos::GLOBALS.set(&globals.syntax_pos_globals, f) - }) + GLOBALS.set(&globals, || syntax_pos::GLOBALS.set(&globals.syntax_pos_globals, f)) } pub fn with_default_globals<F, R>(f: F) -> R - where F: FnOnce() -> R +where + F: FnOnce() -> R, { with_globals(edition::DEFAULT_EDITION, f) } @@ -83,9 +80,9 @@ pub mod util { pub mod comments; pub mod lev_distance; pub mod literal; + pub mod map_in_place; pub mod node_count; pub mod parser; - pub mod map_in_place; } pub mod ast; @@ -95,22 +92,22 @@ pub use syntax_pos::source_map; pub mod entry; pub mod feature_gate { mod check; - pub use check::{check_crate, check_attribute, get_features, feature_err, feature_err_issue}; + pub use check::{check_attribute, check_crate, feature_err, feature_err_issue, get_features}; } pub mod mut_visit; pub mod ptr; pub mod show_span; +pub use rustc_session::parse as sess; pub use syntax_pos::edition; pub use syntax_pos::symbol; -pub use rustc_session::parse as sess; pub mod token; pub mod tokenstream; pub mod visit; pub mod print { + mod helpers; pub mod pp; pub mod pprust; - mod helpers; } pub mod early_buffered_lints; |
