sess.time("missing_docs", || {
rustc_lint::check_crate(tcx, rustc_lint::builtin::MissingDoc::new);
});
+ for &module in tcx.hir().krate().modules.keys() {
+ let local_def_id = tcx.hir().local_def_id(module);
+ tcx.ensure().check_mod_attrs(local_def_id);
+ }
let access_levels = tcx.privacy_access_levels(LOCAL_CRATE);
// Convert from a HirId set to a DefId set since we don't always have easy access
--- /dev/null
+#![crate_type = "lib"]
+#![feature(doc_alias)]
+
+#[doc(alias = "foo")] // ok!
+pub struct Bar;
+
+#[doc(alias)] //~ ERROR
+#[doc(alias = 0)] //~ ERROR
+#[doc(alias("bar"))] //~ ERROR
+pub struct Foo;
--- /dev/null
+error: doc alias attribute expects a string: #[doc(alias = "0")]
+ --> $DIR/check-doc-alias-attr.rs:7:7
+ |
+LL | #[doc(alias)]
+ | ^^^^^
+
+error: doc alias attribute expects a string: #[doc(alias = "0")]
+ --> $DIR/check-doc-alias-attr.rs:8:7
+ |
+LL | #[doc(alias = 0)]
+ | ^^^^^^^^^
+
+error: doc alias attribute expects a string: #[doc(alias = "0")]
+ --> $DIR/check-doc-alias-attr.rs:9:7
+ |
+LL | #[doc(alias("bar"))]
+ | ^^^^^^^^^^^^
+
+error: aborting due to 3 previous errors
+