From e4287992a7b37ed0ae9a9158b1d7bfb4509d2164 Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Tue, 23 Feb 2021 21:53:28 +0100 Subject: [PATCH] No more need for borrow call --- src/librustdoc/passes/doc_test_lints.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/librustdoc/passes/doc_test_lints.rs b/src/librustdoc/passes/doc_test_lints.rs index 2ce43dd9ff8..c97684c7e01 100644 --- a/src/librustdoc/passes/doc_test_lints.rs +++ b/src/librustdoc/passes/doc_test_lints.rs @@ -53,7 +53,7 @@ impl crate::doctest::Tester for Tests { } crate fn should_have_doc_example(cx: &DocContext<'_>, item: &clean::Item) -> bool { - if !cx.renderinfo.borrow().access_levels.is_public(item.def_id) + if !cx.renderinfo.access_levels.is_public(item.def_id) || matches!( *item.kind, clean::StructFieldItem(_)