-
Notifications
You must be signed in to change notification settings - Fork 13.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add new rustdoc broken_footnote
lint
#137803
base: master
Are you sure you want to change the base?
Conversation
I think you might have misunderstood the issue description. "The term of what is meant by anchors is borrowed from" a description of this style of anchor links. It doesn't say anything about footnotes. /// Consider [panics](std::alloc::GlobalAllocator#Panics) on allocation.
// ^^^^^^^ anchor |
I indeed misunderstood and went on a completely different path. Although I still think that this PR is useful. I plan to send a follow-up PR for unused footnote references as well. ^^' I removed the "fixes" mention though. |
This lint seems too noisy to belong in core. Review case F1 of #121659 (comment), where [^a-zA-Z0-9] is syntactically valid as a footnote reference, but not intended to be parsed as one. Following the suggestion (to add If the goal of this lint is to catch typo-ed footnotes, then there should be an unused footnote definition, somewhere, that the author tried and failed to reference. Those are guaranteed to be a problem: either they typo-ed the reference, or they never intended a footnote at all (but still got one). |
That's why we suggest to escape the |
Doing that makes the doc comment less plain-text (noisier). |
c9627d0
to
9976037
Compare
After discussing with @notriddle, it was decided to move the implementation of this lint into its own file. |
This comment has been minimized.
This comment has been minimized.
9976037
to
8f7f71c
Compare
I think in this case, instead of spawning
unpportable_markdown
, we should instead notify that this footnote reference doesn't have an associated definition.r? @notriddle