-
Notifications
You must be signed in to change notification settings - Fork 13.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect missing docs lint for proc-macro-lib crates #42008
Comments
cc #38356 (tracking issue) |
I am hitting the same problem. This issue is preventing |
Same here. Is there a fix for this? |
Seems to still be happening. |
Fails on stable, beta, and nightly still. |
On a proc-macro crate in |
//your proc_macro's mod.rs code...
pub mod decls {
extern crate proc_macro;
#[rustc_proc_macro_decls]
pub static _DECLS: &[proc_macro::bridge::client::ProcMacro] =
&[proc_macro::bridge::client::ProcMacro::bang(
"your_proc_macro",
crate::your_proc_macro,
)];
} |
So I guess the low-effort fix here is slapping EDIT: Looks like the code that generates that is rust/src/libsyntax_ext/proc_macro_decls.rs Lines 339 to 344 in fcf850f
|
Stops unavoidable `missing_docs` warning/error on proc-macro crates. Resolves rust-lang#42008.
…s, r=alexcrichton Add #[doc(hidden)] attribute on compiler generated module. Resolves unavoidable `missing_docs` warning/error on proc-macro crates. Resolves rust-lang#42008. Changes not yet tested locally, however I wanted to submit first since `rustc` takes forever to compile.
proc-macro-lib
crates, when compiled with-W missing-docs
, generate invalid warnings about missing documentation.The following simple crate demonstrates the error.
src/lib.rs
:Cargo.toml
:I expect this to compile cleanly since there is a crate-level doc comment and a doc comment for the public function.
Instead, compiling gives:
which makes no sense since line 1 is a comment.
Compiler version - latest stable, but fails on yesterday's nightly (2017-05-14) too:
rustc --version --verbose
:The text was updated successfully, but these errors were encountered: