diff options
| author | Lukas Kalbertodt <lukas.kalbertodt@gmail.com> | 2019-11-10 19:20:00 +0100 | 
|---|---|---|
| committer | Lukas Kalbertodt <lukas.kalbertodt@gmail.com> | 2019-11-11 08:04:39 +0100 | 
| commit | 696ac95304ecc2c7d20305fbfe104cc9c6bbdbb0 (patch) | |
| tree | 117d04675e64ae8d4c809efb8e5e5cae21e46897 /src/libsyntax_ext/proc_macro_harness.rs | |
| parent | a3b6e5705cff9c69362b7ed2d273ffc148b564db (diff) | |
| download | rust-696ac95304ecc2c7d20305fbfe104cc9c6bbdbb0.tar.gz rust-696ac95304ecc2c7d20305fbfe104cc9c6bbdbb0.zip | |
Fix error message about exported symbols from proc-macro crates
Someone forgot to update the error message after `#[proc_macro]` and `#[proc_macro_attribute]` were stabilized.
Diffstat (limited to 'src/libsyntax_ext/proc_macro_harness.rs')
| -rw-r--r-- | src/libsyntax_ext/proc_macro_harness.rs | 10 | 
1 files changed, 6 insertions, 4 deletions
| diff --git a/src/libsyntax_ext/proc_macro_harness.rs b/src/libsyntax_ext/proc_macro_harness.rs index 792c97d8508..fbded7dc130 100644 --- a/src/libsyntax_ext/proc_macro_harness.rs +++ b/src/libsyntax_ext/proc_macro_harness.rs @@ -92,10 +92,12 @@ pub fn inject(sess: &ParseSess, impl<'a> CollectProcMacros<'a> { fn check_not_pub_in_root(&self, vis: &ast::Visibility, sp: Span) { if self.is_proc_macro_crate && self.in_root && vis.node.is_pub() { - self.handler.span_err(sp, - "`proc-macro` crate types cannot \ - export any items other than functions \ - tagged with `#[proc_macro_derive]` currently"); + self.handler.span_err( + sp, + "`proc-macro` crate types currently cannot export any items other \ + than functions tagged with `#[proc_macro]`, `#[proc_macro_derive]`, \ + or `#[proc_macro_attribute]`", + ); } } | 
