]> git.lizzy.rs Git - rust.git/commitdiff
Auto merge of #106916 - lukas-code:overlapping-substs, r=estebank
authorbors <bors@rust-lang.org>
Sat, 28 Jan 2023 10:00:56 +0000 (10:00 +0000)
committerbors <bors@rust-lang.org>
Sat, 28 Jan 2023 10:00:56 +0000 (10:00 +0000)
Remove overlapping parts of multipart suggestions

This PR adds a debug assertion that the parts of a single substitution cannot overlap, fixes a overlapping substitution from the testsuite, and fixes https://github.com/rust-lang/rust/issues/106870.

Note that a single suggestion can still have multiple overlapping substitutions / possible edits, we just don't suggest overlapping replacements in a single edit anymore.

I've also included a fix for an unrelated bug where rustfix for `explicit_outlives_requirements` would produce multiple trailing commas for a where clause.

1  2 
compiler/rustc_lint/src/builtin.rs
src/tools/clippy/clippy_lints/src/format_args.rs

Simple merge