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
Cargo.toml
cfg.rs
compile_error.rs
concat_idents.rs
concat.rs
env.rs
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
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
proc_macro_impl.rs
proc_macro_registrar.rs Fix spurious warning on empty proc macro crates 2018-01-22 21:09:14 +11:00
trace_macros.rs