rust/src/libsyntax_ext
kennytm 117eb68122
Rollup merge of #47655 - etaoins:fix-spurious-warning-on-empty-proc-macro-crate, r=alexcrichton
Fix spurious warning on empty proc macro crates

While attempting to reproduce rust-lang/rust#47086 I noticed the following warning:

```shell
> rustc /dev/null --crate-type proc-macro
warning: unused variable: `registrar`
 --> /dev/null:0:1
```

As there are no macros to register the automatically generated registrar function for the crate has no body. As a result its `registrar` argument is unused triggering the above warning.

The warning is confusing and not easily actionable by the developer. It could also be triggered legitimately by e.g. having all of the macros in a crate #[cfg]'ed out.

Fix by naming the generated argument `_registrar` inside `mk_registrar()`. This suppresses the unused variable warning.
2018-01-23 22:30:58 +08:00
..
deriving Implement repr(transparent) 2018-01-16 08:58:32 +01:00
asm.rs use field init shorthand EVERYWHERE 2017-08-15 15:29:17 -07:00
Cargo.toml Move unused-extern-crate to late pass 2017-08-27 19:02:24 +09:00
cfg.rs Produce expansion info for more builtin macros 2017-09-04 11:03:19 +02:00
compile_error.rs Stabilize the compile_error_macro feature 2017-07-25 07:09:31 -07:00
concat_idents.rs Produce expansion info for more builtin macros 2017-09-04 11:03:19 +02:00
concat.rs Produce expansion info for more builtin macros 2017-09-04 11:03:19 +02:00
env.rs Produce expansion info for more builtin macros 2017-09-04 11:03:19 +02:00
format_foreign.rs Use Try syntax for Option in place of macros or match 2017-12-09 14:18:33 -08:00
format.rs Add secondary span pointing at the statement (error span) 2018-01-16 18:13:43 -08:00
global_asm.rs use field init shorthand EVERYWHERE 2017-08-15 15:29:17 -07:00
lib.rs Use hygiene to access the injected crate (core or std) from builtin macros. 2017-12-09 17:22:07 -08:00
log_syntax.rs make emit_feature_err take a ParseSess 2016-09-26 07:07:41 +02:00
proc_macro_impl.rs Simplify hygiene::Mark application, and 2017-06-26 02:05:45 +00:00
proc_macro_registrar.rs Fix spurious warning on empty proc macro crates 2018-01-22 21:09:14 +11:00
trace_macros.rs Move syntax::util::interner -> syntax::symbol, cleanup. 2016-11-20 23:40:20 +00:00