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-06-06 12:18:33 +00:00
Code
Issues
Packages
Projects
Releases
Wiki
Activity
901b340c1f
rust
/
tests
/
ui
/
proc-macro
/
auxiliary
/
empty-crate.rs
6 lines
95 B
Rust
Raw
Normal View
History
Unescape
Escape
[AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives
2024-02-16 20:02:50 +00:00
//@ force-host
//@ no-prefer-dynamic
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
#![
crate_type =
"
proc-macro
"
]
#![
deny(unused_variables)
]
Reference in New Issue
Copy Permalink