Auto merge of #130025 - Urgau:missing_docs-expect, r=petrochenkov
Also emit `missing_docs` lint with `--test` to fulfil expectations This PR removes the "test harness" suppression of the `missing_docs` lint to be able to fulfil `#[expect]` (expectations) as it is now "relevant". I think the goal was to maybe avoid false-positive while linting on public items under `#[cfg(test)]` but with effective visibility we should no longer have any false-positive. Another possibility would be to query the lint level and only emit the lint if it's of expect level, but that is even more hacky. Fixes https://github.com/rust-lang/rust/issues/130021 try-job: x86_64-gnu-aux
This commit is contained in:
commit
33855f80d4
11 changed files with 41 additions and 7 deletions
|
@ -426,12 +426,6 @@ impl MissingDoc {
|
|||
article: &'static str,
|
||||
desc: &'static str,
|
||||
) {
|
||||
// If we're building a test harness, then warning about
|
||||
// documentation is probably not really relevant right now.
|
||||
if cx.sess().opts.test {
|
||||
return;
|
||||
}
|
||||
|
||||
// Only check publicly-visible items, using the result from the privacy pass.
|
||||
// It's an option so the crate root can also use this function (it doesn't
|
||||
// have a `NodeId`).
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue