This allows allocating `Expr`s into a dropless arena, which is useful
for using length prefixed thing slices in HIR, since these can only be
allocated in the dropless arena and not in a typed arena. This is
something I'm working on.
Clippy Book Chapter Updates Reborn: Lint Passes
This PR adds a new chapter to the book: "Lint passes". No major changes apart from some re-phrasing, fixing typos... etc.
## Notes
- Requires #10595 to be merged before this one (Or else, a link will be broken).
- To talk about the whole project, please use the tracking issue for the project #10597 (It also contains a timeline, discussions and more information)
changelog: Add a new "Lint passes" chapter to the book
r? `@flip1995`
resolve: Pre-compute non-reexport module children
Instead of repeating the same logic by walking HIR during metadata encoding.
The only difference is that we are no longer encoding `macro_rules` items, but we never currently need them as a part of this list. They can be encoded separately if this need ever arises.
`module_reexports` is also un-querified, because I don't see any reasons to make it a query, only overhead.
Fix UB in `as_ptr_cast_mut` documentation
changelog: none
Fixes#10628
There's no `String::as_mut_ptr` surprisingly, so the example is actually calling `str::as_mut_ptr` on an empty `str`
Instead of repeating the same logic by walking HIR during metadata encoding.
The only difference is that we are no longer encoding `macro_rules` items, but we never currently need them as a part of this list.
They can be encoded separately if this need ever arises.
`module_reexports` is also un-querified, because I don't see any reasons to make it a query, only overhead.
Links to README.md files must actually be links to index.md files,
because of the inner workings of `mdbook`.
Also use the latest mdbook version in CI.
Clear with drain
Fixes#10572: both the original intent of the issue (extending `clear_with_drain`) and the false negative for `collection_is_never_read` I found in the process are fixed by this PR.
changelog: [`clear_with_drain`]: extend to 5 other types of containers. [`collection_is_never_read`]: fix false negative for `String`s.
remove unusued `#![feature(drain_filter)]`
The unstable feature does not appear to be used and its presence blocks work in https://github.com/rust-lang/rust/pull/104455
changelog: none
[missing_const_for_fn] fix#7121
*Please write a short comment explaining your change (or "none" for internal only changes)*
changelog: [`missing_const_for_fn`] note about removing const may break compatibility
fix#7121
Add `max_line_length` to `.editorconfig`, matching `rustfmt.toml`
Add `max_line_length` to `.editorconfig` to match the `max_width` in `rustfmt.toml`.
changelog: none
Make elaboration generic over input
Combines all the `elaborate_*` family of functions into just one, which is an iterator over the same type that you pass in (e.g. elaborating `Predicate` gives `Predicate`s, elaborating `Obligation`s gives `Obligation`s, etc.)
Clippy Book Chapter Updates Reborn: Type Checking
This PR adds a new chapter to the book: "Type Checking", it hasn't changed a lot from the source mainly because there wasn't many reviews on it and I haven't see a lot of things that needed a change.
## Notes
- I have some doubts about the whole "`is_*` Usage" section, what do you think about it.
- For discussion about the whole project, please use the tracking issue for the project #10597 (It also contains a timeline, discussions, and more information)
changelog: Add a new "Type Checking" chapter to the book
r? `@flip1995`
(Small) Fix broken links for Rust merge
rust-lang/rust#110003's CI is [currently broken](https://github.com/rust-lang/rust/actions/runs/4628510374/jobs/8187672234?pr=110003) because of broken links. This PR fixes that.
It was tested against `lintcheck` and found another broken link in `usage.md` (apart from CI's broken links)
changelog:Fix broken links in the book
Sorry for putting more work on you, but you're the one doing the Rust PR
r? `@flip1995`
new lint: suspicious_doc_comments
Fixes#10485.
This PR adds a new lint (`suspicious_doc_comments`) that triggers when the user writes `///!` or `/**!`.
This is almost certainly a mistake and the user probably meant to write an inner doc comment (`//!`, `/*!`) to document the module or crate that this comment is contained in.
changelog: [`suspicious_doc_comments`]: new lint