diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-09-07 20:01:44 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-09-07 20:01:44 +0200 |
| commit | 89a69fd76d275ddd2c81fdbae02a966d24658aaa (patch) | |
| tree | b191b0475521f0d20bf4aaad612c28a4d9a8d952 /src/librustc | |
| parent | 3c4a58622128887778c6fd7c35de66f3fa463708 (diff) | |
| parent | 5153db136e8419beb217340500a97db553ddabbe (diff) | |
| download | rust-89a69fd76d275ddd2c81fdbae02a966d24658aaa.tar.gz rust-89a69fd76d275ddd2c81fdbae02a966d24658aaa.zip | |
Rollup merge of #64139 - Mark-Simulacrum:strip-legacy-proc-macro, r=petrochenkov
Migrate internal diagnostic registration to macro_rules Review is best done commit-by-commit. Fixes #64132.
Diffstat (limited to 'src/librustc')
| -rw-r--r-- | src/librustc/error_codes.rs | 24 | ||||
| -rw-r--r-- | src/librustc/lib.rs | 6 |
2 files changed, 12 insertions, 18 deletions
diff --git a/src/librustc/error_codes.rs b/src/librustc/error_codes.rs index 937a9ea6c1b..eee33846139 100644 --- a/src/librustc/error_codes.rs +++ b/src/librustc/error_codes.rs @@ -1,7 +1,8 @@ // Error messages for EXXXX errors. -// Each message should start and end with a new line, and be wrapped to 80 characters. -// In vim you can `:set tw=80` and use `gq` to wrap paragraphs. Use `:set tw=0` to disable. -register_long_diagnostics! { +// Each message should start and end with a new line, and be wrapped to 80 +// characters. In vim you can `:set tw=80` and use `gq` to wrap paragraphs. Use +// `:set tw=0` to disable. +syntax::register_diagnostics! { E0038: r##" Trait objects like `Box<Trait>` can only be constructed when certain requirements are satisfied by the trait in question. @@ -2183,11 +2184,7 @@ Examples of erroneous code: static X: u32 = 42; ``` "##, - -} - - -register_diagnostics! { +; // E0006, // merged with E0005 // E0101, // replaced with E0282 // E0102, // replaced with E0282 @@ -2206,7 +2203,8 @@ register_diagnostics! { // E0305, // expected constant E0311, // thing may not live long enough E0312, // lifetime of reference outlives lifetime of borrowed content - E0313, // lifetime of borrowed pointer outlives lifetime of captured variable + E0313, // lifetime of borrowed pointer outlives lifetime of captured + // variable E0314, // closure outlives stack frame E0315, // cannot invoke closure outside of its lifetime E0316, // nested quantification of lifetimes @@ -2223,12 +2221,13 @@ register_diagnostics! { E0483, // lifetime of operand does not outlive the operation E0484, // reference is not valid at the time of borrow E0485, // automatically reference is not valid at the time of borrow - E0486, // type of expression contains references that are not valid during... + E0486, // type of expression contains references that are not valid during.. E0487, // unsafe use of destructor: destructor might be called while... E0488, // lifetime of variable does not enclose its declaration E0489, // type/lifetime parameter not in scope here E0490, // a value of type `..` is borrowed for too long - E0495, // cannot infer an appropriate lifetime due to conflicting requirements + E0495, // cannot infer an appropriate lifetime due to conflicting + // requirements E0566, // conflicting representation hints E0623, // lifetime mismatch where both parameters are anonymous regions E0628, // generators cannot have explicit parameters @@ -2239,7 +2238,8 @@ register_diagnostics! { E0688, // in-band lifetimes cannot be mixed with explicit lifetime binders E0697, // closures cannot be static E0707, // multiple elided lifetimes used in arguments of `async fn` - E0708, // `async` non-`move` closures with parameters are not currently supported + E0708, // `async` non-`move` closures with parameters are not currently + // supported E0709, // multiple different lifetimes used in arguments of `async fn` E0710, // an unknown tool name found in scoped lint E0711, // a feature has been declared with conflicting stability attributes diff --git a/src/librustc/lib.rs b/src/librustc/lib.rs index bf4330a29a7..63ef82a7401 100644 --- a/src/librustc/lib.rs +++ b/src/librustc/lib.rs @@ -45,7 +45,6 @@ #![feature(non_exhaustive)] #![feature(optin_builtin_traits)] #![feature(range_is_empty)] -#![feature(rustc_diagnostic_macros)] #![feature(slice_patterns)] #![feature(specialization)] #![feature(unboxed_closures)] @@ -88,8 +87,6 @@ mod tests; #[macro_use] mod macros; -// N.B., this module needs to be declared first so diagnostics are -// registered before they are used. pub mod error_codes; #[macro_use] @@ -142,6 +139,3 @@ pub mod util { // Allows macros to refer to this crate as `::rustc` extern crate self as rustc; - -// Build the diagnostics array at the end so that the metadata includes error use sites. -__build_diagnostic_array! { librustc, DIAGNOSTICS } |
