Use doc(hidden)
instead of allow(missing_docs)
in the test harness
So that it doesn't fail with `forbid(missing_docs)` Fixes #130218
This commit is contained in:
parent
5d456dfaa1
commit
cc34d64c51
4 changed files with 7 additions and 6 deletions
|
@ -326,8 +326,8 @@ fn mk_main(cx: &mut TestCtxt<'_>) -> P<ast::Item> {
|
|||
let main_attr = ecx.attr_word(sym::rustc_main, sp);
|
||||
// #[coverage(off)]
|
||||
let coverage_attr = ecx.attr_nested_word(sym::coverage, sym::off, sp);
|
||||
// #[allow(missing_docs)]
|
||||
let missing_docs_attr = ecx.attr_nested_word(sym::allow, sym::missing_docs, sp);
|
||||
// #[doc(hidden)]
|
||||
let doc_hidden_attr = ecx.attr_nested_word(sym::doc, sym::hidden, sp);
|
||||
|
||||
// pub fn main() { ... }
|
||||
let main_ret_ty = ecx.ty(sp, ast::TyKind::Tup(ThinVec::new()));
|
||||
|
@ -357,7 +357,7 @@ fn mk_main(cx: &mut TestCtxt<'_>) -> P<ast::Item> {
|
|||
|
||||
let main = P(ast::Item {
|
||||
ident: main_id,
|
||||
attrs: thin_vec![main_attr, coverage_attr, missing_docs_attr],
|
||||
attrs: thin_vec![main_attr, coverage_attr, doc_hidden_attr],
|
||||
id: ast::DUMMY_NODE_ID,
|
||||
kind: main,
|
||||
vis: ast::Visibility { span: sp, kind: ast::VisibilityKind::Public, tokens: None },
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue