-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
rustdoc: private_doc_tests lint ignores "ignore" #76457
Copy link
Copy link
Closed
Labels
A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.C-bugCategory: This is a bug.Category: This is a bug.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.C-bugCategory: This is a bug.Category: This is a bug.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
I tried this code:
I expected to see this happen: No warning for the given code block.
Instead, this happened: Warning appears for the given code block.
As it is, I don't see a way to include a rust-highlighted code block with this lint. It is not uncommon to have sample code that is not intended to be tested, or even pseudo-code that you want highlighted, like this:
rust/compiler/rustc_builtin_macros/src/deriving/generic/mod.rs
Lines 490 to 499 in 9fe551a
It would be nice to have some way to make the lint not fire, but still get rust syntax highlighting.
ignoreseems like the first choice I would make, though I guess there could be other options.Meta
rustdoc 1.48.0-nightly (c59199efc 2020-09-04)