rustdoc: detect docs that use re-export concat - #162169
Conversation
This is a prereq for implementing LaTeX math. Because I want to be able to enable it on a per-docblock basis, re-exports need to be parsed with a different set of markdown parsing extensions than the items they link to, which means we can't just concatenate the strings and parse. In any case, markdown that does this would be hard to understand. We should probably lint on it anyway.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
I want to catch false positives before running crater, but it seems like all of these really are re-exports.
d0bf5b3 to
c9f28f6
Compare
This comment has been minimized.
This comment has been minimized.
|
@bors try @craterbot run mode=rustdoc |
|
🚨 Error: missing start toolchain 🆘 If you have any trouble with Crater please ask in t-infra on Zulip |
This comment has been minimized.
This comment has been minimized.
…rt-concat, r=<try> rustdoc: detect docs that use re-export concat
|
@craterbot run mode=rustdoc |
|
👌 Experiment ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more |
|
🚧 Experiment ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more |
|
🎉 Experiment
Footnotes
|
DO NOT MERGE WITHOUT SETTING THE DEFAULT BACK TO WARN
This is a prereq for implementing LaTeX math (tracking issue: #162365). Because I want to be able to enable it on a per-docblock basis, re-exports need to be parsed with a different set of markdown parsing extensions than the items they link to, which means we can't just concatenate the strings and parse like we do now.
This was pointed out, in a similar case, by rust-lang/rfcs#3958 (comment)
IMO, markdown that relies on rustdoc’s current behavior is hard to understand, because string concatenation on separate doc comments is stupid.
This lint is mostly added here to run a Crater, so that we can figure out if there are significant numbers of crates are relying on the current behavior.