about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2019-05-13 21:36:52 +0200
committerGitHub <noreply@github.com>2019-05-13 21:36:52 +0200
commite952b52a16e14fd18b95c0e6cef48ead82d1c266 (patch)
tree41bc42155771fa9dc160bfd79e391e35bd075e39 /src/test
parentc8ef512480296b1398640088fe16759ac9614d81 (diff)
parent5ccf2fb985b5581fdc3f1a3a647b0d613da996d3 (diff)
downloadrust-e952b52a16e14fd18b95c0e6cef48ead82d1c266.tar.gz
rust-e952b52a16e14fd18b95c0e6cef48ead82d1c266.zip
Rollup merge of #60562 - iliekturtles:proc-macro-missing-docs, r=alexcrichton
Add #[doc(hidden)] attribute on compiler generated module.

Resolves unavoidable `missing_docs` warning/error on proc-macro crates.
Resolves #42008.

Changes not yet tested locally, however I wanted to submit first since `rustc` takes forever to compile.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/ui/proc-macro/no-missing-docs.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/test/ui/proc-macro/no-missing-docs.rs b/src/test/ui/proc-macro/no-missing-docs.rs
new file mode 100644
index 00000000000..e5a5f8beb45
--- /dev/null
+++ b/src/test/ui/proc-macro/no-missing-docs.rs
@@ -0,0 +1,16 @@
+//! Verify that the `decls` module implicitly added by the compiler does not cause `missing_docs`
+//! warnings.
+
+// compile-pass
+// force-host
+// no-prefer-dynamic
+
+#![crate_type = "proc-macro"]
+#![deny(missing_docs)]
+
+extern crate proc_macro;
+use proc_macro::*;
+
+/// Foo1.
+#[proc_macro]
+pub fn foo1(input: TokenStream) -> TokenStream { input }