Clippy Book Chapter Updates Reborn: Macro Expansions
This PR adds a new chapter to the book: "Macro Expansions". There weren't big changes apart from grammar, re-phrasing and stylistic choices.
## Notes
- **Does not require any other chapter** to be merged before this
- 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 "Macro Expansions" chapter to the book
r? `@flip1995`
Book: Improve type checking and lint passes chapters
- Adds the lint passes chapter to the index.
- Moves additional reading material for beginners to the front page of the development section.
- Clarify some details in `hir::Ty` vs `ty::Ty`.
`@blyxyas` I started reviewing the chapters that were already merged. Great work. I liked the additional reading chapter so much, that I moved it front and center. Other than that I only had some minor corrections to make. Please review.
r? `@llogiq`
changelog: none
Adds the lint passes chapter to the index.
Moves additional reading material for beginners to the front page of the
development section.
Clarify some details in hir::Ty vs ty::Ty.
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`
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`
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
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
fix `single_component_path_imports` FP on `self::<import>::..`
fixes#10549
I noticed that a couple functions in the file I was working on took `cx` as a parameter but didn't use them, so I removed that. Can revert if desired because it isn't related to my changes.
changelog: [`single_component_path_imports`] don't suggest removing import when it is used as `self::<import>::..`