-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update to Rust 1.74 and use new clippy lints table (#8722)
Update to [Rust 1.74](https://blog.rust-lang.org/2023/11/16/Rust-1.74.0.html) and use the new clippy lints table. The update itself introduced a new clippy lint about superfluous hashes in raw strings, which got removed. I moved our lint config from `rustflags` to the newly stabilized [workspace.lints](https://doc.rust-lang.org/stable/cargo/reference/workspaces.html#the-lints-table). One consequence is that we have to `unsafe_code = "warn"` instead of "forbid" because the latter now actually bans unsafe code: ``` error[E0453]: allow(unsafe_code) incompatible with previous forbid --> crates/ruff_source_file/src/newlines.rs:62:17 | 62 | #[allow(unsafe_code)] | ^^^^^^^^^^^ overruled by previous forbid | = note: `forbid` lint level was set on command line ``` --------- Co-authored-by: Charlie Marsh <[email protected]>
- Loading branch information
1 parent
6d5d079
commit 14e65af
Showing
71 changed files
with
1,124 additions
and
1,054 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,3 @@ | ||
[alias] | ||
dev = "run --package ruff_dev --bin ruff_dev" | ||
benchmark = "bench -p ruff_benchmark --bench linter --bench formatter --" | ||
|
||
[target.'cfg(all())'] | ||
rustflags = [ | ||
# CLIPPY LINT SETTINGS | ||
# This is a workaround to configure lints for the entire workspace, pending the ability to configure this via TOML. | ||
# See: `https://github.com/rust-lang/cargo/issues/5034` | ||
# `https://github.com/EmbarkStudios/rust-ecosystem/issues/22#issuecomment-947011395` | ||
"-Dunsafe_code", | ||
"-Wclippy::pedantic", | ||
# Allowed pedantic lints | ||
"-Wclippy::char_lit_as_u8", | ||
"-Aclippy::collapsible_else_if", | ||
"-Aclippy::collapsible_if", | ||
"-Aclippy::implicit_hasher", | ||
"-Aclippy::match_same_arms", | ||
"-Aclippy::missing_errors_doc", | ||
"-Aclippy::missing_panics_doc", | ||
"-Aclippy::module_name_repetitions", | ||
"-Aclippy::must_use_candidate", | ||
"-Aclippy::similar_names", | ||
"-Aclippy::too_many_lines", | ||
# Disallowed restriction lints | ||
"-Wclippy::print_stdout", | ||
"-Wclippy::print_stderr", | ||
"-Wclippy::dbg_macro", | ||
"-Wclippy::empty_drop", | ||
"-Wclippy::empty_structs_with_brackets", | ||
"-Wclippy::exit", | ||
"-Wclippy::get_unwrap", | ||
"-Wclippy::rc_buffer", | ||
"-Wclippy::rc_mutex", | ||
"-Wclippy::rest_pat_in_fully_bound_structs", | ||
"-Wunreachable_pub" | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,3 +34,6 @@ toml = { workspace = true } | |
|
||
[dev-dependencies] | ||
pretty_assertions = "1.3.0" | ||
|
||
[lints] | ||
workspace = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,3 +20,6 @@ seahash = "4.1.0" | |
|
||
[dev-dependencies] | ||
ruff_macros = { path = "../ruff_macros" } | ||
|
||
[lints] | ||
workspace = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.