Rename rustc_middle::lint::LintSource
Rename rustc_middle::lint::LintSource to rustc_middle::lint::LintLevelSource.
This commit is contained in:
parent
11c94a1977
commit
aec3575aa7
5 changed files with 32 additions and 32 deletions
|
|
@ -5,7 +5,7 @@ use crate::html::markdown::{find_testable_code, ErrorCodes};
|
|||
use crate::passes::doc_test_lints::{should_have_doc_example, Tests};
|
||||
use crate::passes::Pass;
|
||||
use rustc_lint::builtin::MISSING_DOCS;
|
||||
use rustc_middle::lint::LintSource;
|
||||
use rustc_middle::lint::LintLevelSource;
|
||||
use rustc_session::lint;
|
||||
use rustc_span::symbol::sym;
|
||||
use rustc_span::FileName;
|
||||
|
|
@ -254,7 +254,7 @@ impl<'a, 'b> fold::DocFolder for CoverageCalculator<'a, 'b> {
|
|||
// `missing_docs` is allow-by-default, so don't treat this as ignoring the item
|
||||
// unless the user had an explicit `allow`
|
||||
let should_have_docs =
|
||||
level != lint::Level::Allow || matches!(source, LintSource::Default);
|
||||
level != lint::Level::Allow || matches!(source, LintLevelSource::Default);
|
||||
debug!("counting {:?} {:?} in {}", i.type_(), i.name, filename);
|
||||
self.items.entry(filename).or_default().count_item(
|
||||
has_docs,
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ use crate::clean::*;
|
|||
use crate::core::DocContext;
|
||||
use crate::fold::DocFolder;
|
||||
use crate::html::markdown::{find_testable_code, ErrorCodes, Ignore, LangString};
|
||||
use rustc_middle::lint::LintSource;
|
||||
use rustc_middle::lint::LintLevelSource;
|
||||
use rustc_session::lint;
|
||||
|
||||
crate const CHECK_PRIVATE_ITEMS_DOC_TESTS: Pass = Pass {
|
||||
|
|
@ -77,7 +77,7 @@ crate fn should_have_doc_example(cx: &DocContext<'_>, item: &clean::Item) -> boo
|
|||
let hir_id = cx.tcx.hir().local_def_id_to_hir_id(item.def_id.expect_local());
|
||||
let (level, source) =
|
||||
cx.tcx.lint_level_at_node(lint::builtin::MISSING_DOC_CODE_EXAMPLES, hir_id);
|
||||
level != lint::Level::Allow || matches!(source, LintSource::Default)
|
||||
level != lint::Level::Allow || matches!(source, LintLevelSource::Default)
|
||||
}
|
||||
|
||||
crate fn look_for_tests<'tcx>(cx: &DocContext<'tcx>, dox: &str, item: &Item) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue