Skip to content

Commit

Permalink
Auto merge of #113734 - cjgillot:no-crate-lint, r=petrochenkov
Browse files Browse the repository at this point in the history
Convert builtin "global" late lints to run per module

The compiler currently has 4 non-incremental lints:
1. `clashing_extern_declarations`;
2. `missing_debug_implementations`;
3. ~`unnameable_test_items`;~ changed by rust-lang/rust#114414
4. `missing_docs`.

Non-incremental lints get reexecuted for each compilation, which is slow. Moreover, those lints are allow-by-default, so run for nothing most of the time. This PR attempts to make them more incremental-friendly.

`clashing_extern_declarations` is moved to a standalone query.

`missing_debug_implementation` can use `non_blanket_impls_for_ty` instead of recomputing it.

`missing_docs` is harder as it needs to track if there is a `doc(hidden)` module surrounding. I hack around this using the lint level engine. That's easy to implement and allows to re-enable the lint for a re-exported module, while a more proper solution would reuse the same device as `unnameable_test_items`.
  • Loading branch information
bors committed Aug 5, 2023
2 parents 3a54c6d + 0c033f4 commit f36536b
Showing 0 changed files with 0 additions and 0 deletions.

0 comments on commit f36536b

Please sign in to comment.