This website requires JavaScript.
Explore
Help
Register
Sign In
mikros
/
rust
Watch
1
Star
0
Fork
0
You've already forked rust
Code
Issues
Pull Requests
Packages
Projects
Releases
Wiki
Activity
3088c4b046
rust
/
tests
/
ui
/
proc-macro
/
auxiliary
/
empty-crate.rs
6 lines
93 B
Rust
Raw
Normal View
History
Unescape
Escape
tests: use `force-host` and `no-prefer-dynamic` in all proc_macro tests.
2018-11-24 07:34:13 -06:00
// force-host
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-22 03:58:21 -06:00
// no-prefer-dynamic
#![
crate_type =
"
proc-macro
"
]
#![
deny(unused_variables)
]
Reference in New Issue
Copy Permalink