Refactor: arrange transmute lints
This PR arranges `transmute` lints so that they can be accessed more easily.
Basically, I followed the instruction described in #6680 as to how to do the refactoring.
- `declare_clippy_lint!` and `impl LintPass` is placed in `transmute/mod.rs`
- Uitlity functions is placed in `transmute/utils.rs`
- Each lint function about `transmute` is moved into its own module, like `transmute/useless_transmute.rs`
For ease of review, I refactored step by step, keeping each commit small. For instance, all I did in
2451781 was to move `useless_transmute` into its own module.
---
changelog: Refactor `transmute.rs` file into `transmute` module.
Rustfmt version "Two"
changelog: none
This enables some ~bug fixes~ changes from rustfmt. This is more consistent with rustc's config, and should be more forward-compatible. Also, the changes look good IMO. 😃
lintcheck, do some refactoring and add more sources
refactor: add a Config object
don't run in parallel mode by default (it didn't make sense because cargo would lock the shared target dir anyway)
show full paths (from repo root) to the source files in clippy warnings so we can just copy the path from the logfile
fix more bugs
add more crates by dtolnay and embark to the sources toml
changelog: lintcheck: refactor some code and add more sources
fix a couple of issues when checking if lintcheck needed rerun after clippy binary changed.
I was apparently still comparing the times wrongly, but it should be fixed™ now...
I actually looked at the date of the sources.toml and not at the date of the log file!
Also fix progress report counter not advancing in squential mode
tests: add test that roughly ensures that our lint messages conform with the diagnostics convention of the rustc dev guide
lint message should not start with uppercase letters
lint messages should not have punctuation at the end of the last line
https://rustc-dev-guide.rust-lang.org/diagnostics.html#diagnostic-structure
The test reads through all the .stderr files in the testsuit and checks lint messages that start with "help: ", "error: " etc.
There is also an exception list for special messages that are deemed acceptable.
changelog: make sure lint messages conform with the rustc dev guide and add test
lint message should not start with uppercase letters
lint messages should not have punctuation at the end of the last line
https://rustc-dev-guide.rust-lang.org/diagnostics.html#diagnostic-structure
The test reads through all the .stderr files in the testsuit and checks lint messages that start with "help: ", "error: " etc.
There is also an exception list for special messages that are deemed acceptable.
changelog: make sure lint messages conform with the rustc dev guide and add test
Fix ICEs 6792 and 6793
fixes#6792, fixes#6793.
r? `@matthiaskrgr`
Fixes the ICEs by replacing `TyCtxt::type_of` with `TypeckResults::expr_ty`.
changelog: none