Skip to content

Commit 8984d65

Browse files
authored
Rollup merge of rust-lang#140709 - notriddle:rm-unportable-markdown, r=GuillaumeGomez
rustdoc: remove unportable markdown lint and old parser Follow up rust-lang#127127
2 parents 5b165aa + e648e5b commit 8984d65

File tree

7 files changed

+3
-258
lines changed

7 files changed

+3
-258
lines changed

Cargo.lock

+2-14
Original file line numberDiff line numberDiff line change
@@ -558,7 +558,7 @@ dependencies = [
558558
"if_chain",
559559
"itertools",
560560
"parking_lot",
561-
"pulldown-cmark 0.11.3",
561+
"pulldown-cmark",
562562
"quote",
563563
"regex",
564564
"rustc_tools_util 0.4.2",
@@ -2849,17 +2849,6 @@ dependencies = [
28492849
"cc",
28502850
]
28512851

2852-
[[package]]
2853-
name = "pulldown-cmark"
2854-
version = "0.9.6"
2855-
source = "registry+https://github.com/rust-lang/crates.io-index"
2856-
checksum = "57206b407293d2bcd3af849ce869d52068623f19e1b5ff8e8778e3309439682b"
2857-
dependencies = [
2858-
"bitflags",
2859-
"memchr",
2860-
"unicase",
2861-
]
2862-
28632852
[[package]]
28642853
name = "pulldown-cmark"
28652854
version = "0.11.3"
@@ -4337,7 +4326,7 @@ version = "0.0.0"
43374326
dependencies = [
43384327
"bitflags",
43394328
"itertools",
4340-
"pulldown-cmark 0.11.3",
4329+
"pulldown-cmark",
43414330
"rustc_arena",
43424331
"rustc_ast",
43434332
"rustc_ast_pretty",
@@ -4621,7 +4610,6 @@ dependencies = [
46214610
"indexmap",
46224611
"itertools",
46234612
"minifier",
4624-
"pulldown-cmark 0.9.6",
46254613
"pulldown-cmark-escape",
46264614
"regex",
46274615
"rustdoc-json-types",

src/librustdoc/Cargo.toml

-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ base64 = "0.21.7"
1414
itertools = "0.12"
1515
indexmap = "2"
1616
minifier = { version = "0.3.5", default-features = false }
17-
pulldown-cmark-old = { version = "0.9.6", package = "pulldown-cmark", default-features = false }
1817
pulldown-cmark-escape = { version = "0.11.0", features = ["simd"] }
1918
regex = "1"
2019
rustdoc-json-types = { path = "../rustdoc-json-types" }

src/librustdoc/lint.rs

+1-9
Original file line numberDiff line numberDiff line change
@@ -196,14 +196,6 @@ declare_rustdoc_lint! {
196196
"detects redundant explicit links in doc comments"
197197
}
198198

199-
declare_rustdoc_lint! {
200-
/// This compatibility lint checks for Markdown syntax that works in the old engine but not
201-
/// the new one.
202-
UNPORTABLE_MARKDOWN,
203-
Warn,
204-
"detects markdown that is interpreted differently in different parser"
205-
}
206-
207199
pub(crate) static RUSTDOC_LINTS: Lazy<Vec<&'static Lint>> = Lazy::new(|| {
208200
vec![
209201
BROKEN_INTRA_DOC_LINKS,
@@ -217,7 +209,6 @@ pub(crate) static RUSTDOC_LINTS: Lazy<Vec<&'static Lint>> = Lazy::new(|| {
217209
MISSING_CRATE_LEVEL_DOCS,
218210
UNESCAPED_BACKTICKS,
219211
REDUNDANT_EXPLICIT_LINKS,
220-
UNPORTABLE_MARKDOWN,
221212
]
222213
});
223214

@@ -241,4 +232,5 @@ pub(crate) fn register_lints(_sess: &Session, lint_store: &mut LintStore) {
241232
.register_renamed("intra_doc_link_resolution_failure", "rustdoc::broken_intra_doc_links");
242233
lint_store.register_renamed("non_autolinks", "rustdoc::bare_urls");
243234
lint_store.register_renamed("rustdoc::non_autolinks", "rustdoc::bare_urls");
235+
lint_store.register_removed("rustdoc::unportable_markdown", "old parser removed");
244236
}

src/librustdoc/passes/lint.rs

-4
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ mod check_code_block_syntax;
66
mod html_tags;
77
mod redundant_explicit_links;
88
mod unescaped_backticks;
9-
mod unportable_markdown;
109

1110
use super::Pass;
1211
use crate::clean::*;
@@ -49,9 +48,6 @@ impl DocVisitor<'_> for Linter<'_, '_> {
4948
}
5049
if may_have_block_comment_or_html {
5150
html_tags::visit_item(self.cx, item, hir_id, &dox);
52-
unportable_markdown::visit_item(self.cx, item, hir_id, &dox);
53-
} else if may_have_link {
54-
unportable_markdown::visit_item(self.cx, item, hir_id, &dox);
5551
}
5652
}
5753

src/librustdoc/passes/lint/unportable_markdown.rs

-145
This file was deleted.

tests/rustdoc-ui/unportable-markdown.rs

-62
This file was deleted.

tests/rustdoc-ui/unportable-markdown.stderr

-23
This file was deleted.

0 commit comments

Comments
 (0)