You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now clippy reports the following when running cargo clippy --fix
$ cargo clippy --fix
Checking serde-json-core v0.6.0 (/[...]/serde-json-core)
warning: error applying suggestions to `src/de/enum_.rs`
The full error message was:
> cannot replace slice of data that was already replaced
This likely indicates a bug in either rustc or cargo itself,
and we would appreciate a bug report! You're likely to see
a number of compiler warnings after this message which cargo
attempted to fix but failed. If you could open an issue at
https://github.com/rust-lang/rust-clippy/issues
quoting the full output of this command we'd be very appreciative!
Note that you may be able to make some more progress in the near-term
fixing code with the `--broken-code` flag
warning: error applying suggestions to `src/de/enum_.rs`
The full error message was:
> cannot replace slice of data that was already replaced
This likely indicates a bug in either rustc or cargo itself,
and we would appreciate a bug report! You're likely to see
a number of compiler warnings after this message which cargo
attempted to fix but failed. If you could open an issue at
https://github.com/rust-lang/rust-clippy/issues
quoting the full output of this command we'd be very appreciative!
Note that you may be able to make some more progress in the near-term
fixing code with the `--broken-code` flag
warning: error applying suggestions to `src/de/map.rs`
The full error message was:
> cannot replace slice of data that was already replaced
This likely indicates a bug in either rustc or cargo itself,
and we would appreciate a bug report! You're likely to see
a number of compiler warnings after this message which cargo
attempted to fix but failed. If you could open an issue at
https://github.com/rust-lang/rust-clippy/issues
quoting the full output of this command we'd be very appreciative!
Note that you may be able to make some more progress in the near-term
fixing code with the `--broken-code` flag
Fixed src/de/enum_.rs (0 fixes)
Fixed src/de/map.rs (0 fixes)
warning: the following explicit lifetimes could be elided: 'a, 's
--> src/de/enum_.rs:28:11
|
28 | impl<'de, 'a, 's> de::VariantAccess<'de> for UnitVariantAccess<'a, 'de, 's> {
| ^^ ^^ ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
note: the lint level is defined here
--> src/lib.rs:79:9
|
79 | #![deny(warnings)]
| ^^^^^^^^
= note: `#[warn(clippy::needless_lifetimes)]` implied by `#[warn(warnings)]`
help: elide the lifetimes
|
28 - impl<'de, 'a, 's> de::VariantAccess<'de> for UnitVariantAccess<'a, 'de, 's> {
28 + impl<'de, > de::VariantAccess<'de> for UnitVariantAccess<'_, 'de, '_> {
|
warning: the following explicit lifetimes could be elided: 'a, 's
--> src/de/enum_.rs:81:11
|
81 | impl<'de, 'a, 's> de::VariantAccess<'de> for VariantAccess<'a, 'de, 's> {
| ^^ ^^ ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
81 - impl<'de, 'a, 's> de::VariantAccess<'de> for VariantAccess<'a, 'de, 's> {
81 + impl<'de, > de::VariantAccess<'de> for VariantAccess<'_, 'de, '_> {
|
warning: the following explicit lifetimes could be elided: 'a, 's
--> src/de/map.rs:64:11
|
64 | impl<'de, 'a, 's> de::Deserializer<'de> for MapKey<'a, 'de, 's> {
| ^^ ^^ ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
64 - impl<'de, 'a, 's> de::Deserializer<'de> for MapKey<'a, 'de, 's> {
64 + impl<'de, > de::Deserializer<'de> for MapKey<'_, 'de, '_> {
|
warning: `serde-json-core` (lib) generated 3 warnings (run `cargo clippy --fix --lib -p serde-json-core` to apply 3 suggestions)
warning: error applying suggestions to `src/de/map.rs`
The full error message was:
> cannot replace slice of data that was already replaced
This likely indicates a bug in either rustc or cargo itself,
and we would appreciate a bug report! You're likely to see
a number of compiler warnings after this message which cargo
attempted to fix but failed. If you could open an issue at
https://github.com/rust-lang/rust-clippy/issues
quoting the full output of this command we'd be very appreciative!
Note that you may be able to make some more progress in the near-term
fixing code with the `--broken-code` flag
warning: error applying suggestions to `src/de/enum_.rs`
The full error message was:
> cannot replace slice of data that was already replaced
This likely indicates a bug in either rustc or cargo itself,
and we would appreciate a bug report! You're likely to see
a number of compiler warnings after this message which cargo
attempted to fix but failed. If you could open an issue at
https://github.com/rust-lang/rust-clippy/issues
quoting the full output of this command we'd be very appreciative!
Note that you may be able to make some more progress in the near-term
fixing code with the `--broken-code` flag
warning: error applying suggestions to `src/de/enum_.rs`
The full error message was:
> cannot replace slice of data that was already replaced
This likely indicates a bug in either rustc or cargo itself,
and we would appreciate a bug report! You're likely to see
a number of compiler warnings after this message which cargo
attempted to fix but failed. If you could open an issue at
https://github.com/rust-lang/rust-clippy/issues
quoting the full output of this command we'd be very appreciative!
Note that you may be able to make some more progress in the near-term
fixing code with the `--broken-code` flag
Fixed src/de/map.rs (0 fixes)
Fixed src/de/enum_.rs (0 fixes)
warning: `serde-json-core` (lib test) generated 3 warnings (3 duplicates)
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.41s
sirhcel
changed the title
Clippy fails to automatically fix issues for serge-json-core
Clippy fails to automatically fix issues for serde-json-core
Feb 5, 2025
Summary
Clippy asked me to report this following when I tried to automatically fix issues for https://github.com/sirhcel/serde-json-core/commits/147cac1064c7ed65c04b48297067f742acd5f504/.
cargo clippy --fix
as of https://github.com/rust-embedded-community/serde-json-core/commits/df0f29d1ac9f18c329afec24809192a688661e75/cargo clippy --fix
Reproducer
I tried this code: https://github.com/sirhcel/serde-json-core/commits/147cac1064c7ed65c04b48297067f742acd5f504/
I expected to see this happen: Clippy to fix all issues it reported from
cargo clippy --fix
.Instead, this happened: I got warnings asking me to open an issue.
Version
Additional Labels
No response
The text was updated successfully, but these errors were encountered: