chore: CTS update, workspace lints migration, and lint cleanup - #122
Merged
Conversation
Updates the CTS submodule from 9277705 to 7be7c1f (19 commits), including new tests for function extensions, filter selectors, normalized paths, and array slices. All compliance tests pass.
- rename clippy::empty_enum to clippy::empty_enums - remove clippy::match_on_vec_items (removed; covered by clippy::indexing_slicing)
Applied via cargo clippy --fix. Adds explicit '_ lifetimes to return-type paths where the input lifetime is elided, satisfying the mismatched_lifetime_syntaxes rustc lint.
Moves the lint declarations from crate-level attributes in each lib.rs to [workspace.lints] in the root Cargo.toml, with each member crate opting in via [lints] workspace = true. The lint set is unchanged. This newly applies the lints to the previously-unlinted serde_json_path_macros_internal crate and to test targets: - add crate/function docs in the internal macros crate - restrict unreachable pub items to pub(crate) in the internal macros crate - add crate docs to integration test files
The previous list was inherited from axum at project inception. Remove lints that are redundant or not applicable to this library: - on by default, so redundant: clippy::all, unexpected_cfgs, future_incompatible, nonstandard_style, clippy::needless_borrow - no async/mutex code: await_holding_lock, if_let_mutex - no file IO: verbose_file_reads - no float math: imprecise_flops, suboptimal_flops, lossy_float_literal - remaining pedantic/restriction lints guarding against patterns not present in the codebase - clippy::type_complexity allow no longer triggered by any code Retained: missing_docs, missing_debug_implementations, unreachable_pub, unsafe_code (public API hygiene); rust_2018_idioms; clippy::dbg_macro and clippy::todo (leftover debug artifacts).
Add the explicit '_ lifetime at all sites where it was elided. This makes lifetime-carrying types visible at use sites and completes the lifetime-syntax cleanup started with the mismatched_lifetime_syntaxes fixes.
The question_mark lint in clippy 1.97 (used by CI, which tracks stable) newly flags if-let/else-return-None blocks that assign through a binding. Rewrite the two singular query segment matches in SingularQuery::eval_query with direct assignment and the ? operator.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Maintenance work, in six commits intended to be preserved via rebase/merge:
9277705→7be7c1f, 19 upstream commits). All compliance tests pass against the newcts.json.clippy::empty_enumrenamed toclippy::empty_enums;clippy::match_on_vec_itemsremoved (dropped from clippy, covered byclippy::indexing_slicing).mismatched_lifetime_syntaxeslints (76 sites, viacargo clippy --fix).[workspace.lints]in the rootCargo.toml, replacing the duplicated attribute blocks in eachlib.rs. This newly lints theserde_json_path_macros_internalcrate and test targets; the resulting findings are fixed in the same commit.missing_docs,missing_debug_implementations,unreachable_pub,unsafe_code,rust_2018_idioms,clippy::dbg_macro,clippy::todo.elided_lifetimes_in_pathsallow and add explicit'_at the 34 sites that elided it.Release impact
Patch. No public API changes. The
[lints]table in published manifests is ignored with a warning by cargo < 1.74 (verified empirically on 1.73.0); builds still succeed there.Verification
cargo nextest run: 55/55 pass, including the compliance suitecargo clippy --workspace --all-targets: zero warningscargo fmtclean