This website requires JavaScript.
Explore
Help
Sign In
nordic-dev.net
/
rust
Watch
2
Star
0
Fork
0
You've already forked rust
mirror of
https://github.com/rust-lang/rust.git
synced
2025-05-09 16:37:36 +00:00
Code
Issues
Packages
Projects
Releases
Wiki
Activity
254bf6027d
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 13:34:13 +00: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 09:58:21 +00:00
// no-prefer-dynamic
#![
crate_type =
"
proc-macro
"
]
#![
deny(unused_variables)
]
Reference in New Issue
Copy Permalink