diff options
| author | Manish Goregaokar <manishsmail@gmail.com> | 2016-07-02 15:46:49 +0530 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-07-02 15:46:49 +0530 |
| commit | 2c643bd4d0efd67665b2cb57ff485bcd79cce76d (patch) | |
| tree | a2ea60fd65d9eda2be3954869d4d3d6bce483bb7 /src/libsyntax/lib.rs | |
| parent | 7e07e31600d2b15697c2fffceb9d08c65af6a062 (diff) | |
| parent | 84e874f0e0969b65e24e2705aac7604b79e387b0 (diff) | |
| download | rust-2c643bd4d0efd67665b2cb57ff485bcd79cce76d.tar.gz rust-2c643bd4d0efd67665b2cb57ff485bcd79cce76d.zip | |
Rollup merge of #34531 - GuillaumeGomez:libsyntax_err_codes, r=jonathandturner
Add error codes in libsyntax r? @jonathandturner Fixes #34526
Diffstat (limited to 'src/libsyntax/lib.rs')
| -rw-r--r-- | src/libsyntax/lib.rs | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/src/libsyntax/lib.rs b/src/libsyntax/lib.rs index 652cf68db07..8febf1c49ec 100644 --- a/src/libsyntax/lib.rs +++ b/src/libsyntax/lib.rs @@ -33,6 +33,7 @@ #![feature(str_escape)] #![feature(unicode)] #![feature(question_mark)] +#![feature(rustc_diagnostic_macros)] extern crate serialize; extern crate term; @@ -66,6 +67,18 @@ macro_rules! panictry { }) } +#[macro_use] +pub mod diagnostics { + #[macro_use] + pub mod macros; + pub mod plugin; + pub mod metadata; +} + +// NB: This module needs to be declared first so diagnostics are +// registered before they are used. +pub mod diagnostic_list; + pub mod util { pub mod interner; pub mod lev_distance; @@ -80,12 +93,6 @@ pub mod util { pub use self::thin_vec::ThinVec; } -pub mod diagnostics { - pub mod macros; - pub mod plugin; - pub mod metadata; -} - pub mod json; pub mod syntax { @@ -130,3 +137,5 @@ pub mod ext { pub mod macro_rules; } } + +// __build_diagnostic_array! { libsyntax, DIAGNOSTICS } |
