Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix tidy so ci is useful again
  • Loading branch information
jyn514 committed Mar 26, 2022
commit 7531753faa1fa2f007b8d69cff7c4404e7b3c427
2 changes: 1 addition & 1 deletion src/librustdoc/core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ use std::mem;
use std::rc::Rc;

use crate::clean::inline::build_external_trait;
use crate::clean::{self, ItemId, TraitWithExtraInfo, Crate};
use crate::clean::{self, Crate, ItemId, TraitWithExtraInfo};
use crate::config::{Options as RustdocOptions, OutputFormat, RenderOptions};
use crate::formats::cache::Cache;
use crate::passes::{self, Condition::*, ConditionalPass};
Expand Down
1 change: 0 additions & 1 deletion src/librustdoc/formats/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ crate enum RenderMode {

/// Metadata about implementations for a type or trait.
#[derive(Clone, Debug)]
// TODO: this should not exist
crate struct Impl {
crate impl_item: clean::Item,
}
Expand Down
16 changes: 13 additions & 3 deletions src/librustdoc/passes/collect_intra_doc_links.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,21 @@ use std::fmt::Write;
use std::mem;
use std::ops::Range;

use crate::{clean::{self, utils::find_nearest_parent_module}, html::{format::HrefError, markdown::{MarkdownLink, markdown_links}}, lint::{PRIVATE_INTRA_DOC_LINKS, BROKEN_INTRA_DOC_LINKS}, visit::DocVisitor};
use crate::clean::{Crate, Item, ItemId, ItemLink, PrimitiveType};
use crate::core::DocContext;
use crate::{
clean::{self, utils::find_nearest_parent_module},
html::{
format::HrefError,
markdown::{markdown_links, MarkdownLink},
},
lint::{BROKEN_INTRA_DOC_LINKS, PRIVATE_INTRA_DOC_LINKS},
visit::DocVisitor,
};

mod early;
crate use early::early_resolve_intra_doc_links;
use super::Pass;
crate use early::early_resolve_intra_doc_links;

crate const COLLECT_INTRA_DOC_LINKS: Pass = Pass {
name: "collect-intra-doc-links",
Expand Down Expand Up @@ -1436,7 +1444,9 @@ impl LinkCollector<'_, '_> {
return Some(());
}
// `relative_to` is only used for the actual path of the link, not whether it's resolved or not.
if let Err(missing) = crate::html::format::href_inner(id, self.cx.tcx, &self.cx.cache, None, &[]) {
if let Err(missing) =
crate::html::format::href_inner(id, self.cx.tcx, &self.cx.cache, None, &[])
{
missing_docs_for_link(self.cx, &item, id, missing, &path_str, &diag_info);
}

Expand Down
15 changes: 9 additions & 6 deletions src/librustdoc/passes/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,15 +110,18 @@ crate const DEFAULT_PASSES: (&[ConditionalPass], &[ConditionalPass]) = (
ConditionalPass::always(CHECK_INVALID_HTML_TAGS),
ConditionalPass::always(PROPAGATE_DOC_CFG),
ConditionalPass::always(CHECK_BARE_URLS),
]
],
);

/// The list of default passes run when `--doc-coverage` is passed to rustdoc.
crate const COVERAGE_PASSES: (&[ConditionalPass], &[ConditionalPass]) = (&[
ConditionalPass::new(STRIP_HIDDEN, WhenNotDocumentHidden),
ConditionalPass::new(STRIP_PRIVATE, WhenNotDocumentPrivate),
ConditionalPass::always(CALCULATE_DOC_COVERAGE),
], &[]);
crate const COVERAGE_PASSES: (&[ConditionalPass], &[ConditionalPass]) = (
&[
ConditionalPass::new(STRIP_HIDDEN, WhenNotDocumentHidden),
ConditionalPass::new(STRIP_PRIVATE, WhenNotDocumentPrivate),
ConditionalPass::always(CALCULATE_DOC_COVERAGE),
],
&[],
);

impl ConditionalPass {
crate const fn always(pass: Pass) -> Self {
Expand Down