Repository: rust
Issue: cargo fix report errors after fixes
Labels: C-bug,S-needs-repro

<!--
Thank you for filing a bug report! 🐛 Please provide a short summary of the bug,
along with any information you feel relevant to replicating the bug.
-->

I tried this code:

```rust
cargo fix --allow-dirty --allow-staged
```

I expected cargo to fix the lint warnings reported by rustc

Instead, I got the following warnings

### Meta
<!--
If you're using the stable version of the compiler, you should also check if the
bug also exists in the beta or nightly versions.
-->

`rustc --version --verbose`:
```
<version>
```

<!--
Include a backtrace in the code block by setting `RUST_BACKTRACE=1` in your
environment. E.g. `RUST_BACKTRACE=1 cargo build`.
-->
<details><summary>Backtrace</summary>
<p>

```
warning: failed to automatically apply fixes suggested by rustc to crate `apibara_sink_parquet`

after fixes were automatically applied the compiler reported errors within these files:

  * sink-parquet/src/sink.rs

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/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

The following errors were reported:
error: attempting to skip non-existent parameter
   --> sink-parquet/src/sink.rs:130:29
    |
130 |     #[instrument(skip(self, cursor), err(Debug))]
    |                             ^^^^^^

error: aborting due to previous error

Original diagnostics will follow.

warning: unused variable: `cursor`
   --> sink-parquet/src/sink.rs:131:43
    |
131 |     async fn handle_invalidate(&mut self, cursor: &Option<Cursor>) -> Result<(), Self::Error> {
    |                                           ^^^^^^ help: if this is intentional, prefix it with an underscore: `_cursor`
    |
    = note: `#[warn(unused_variables)]` on by default

warning: `apibara-sink-parquet` (lib) generated 1 warning (run `cargo fix --lib -p apibara-sink-parquet` to apply 1 suggestion)
warning: function `test_reorg_from_client_pov` is never used
  --> starknet/tests/test_reorgs.rs:23:10
   |
23 | async fn test_reorg_from_client_pov() {
   |          ^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: `#[warn(dead_code)]` on by default

warning: struct `DevnetClient` is never constructed
  --> starknet/tests/common/mod.rs:39:12
   |
39 | pub struct DevnetClient {
   |            ^^^^^^^^^^^^

warning: associated items `new`, `mint`, and `abort_blocks` are never used
  --> starknet/tests/common/mod.rs:45:12
   |
44 | impl DevnetClient {
   | ----------------- associated items in this implementation
45 |     pub fn new(base_url: String) -> Self {
   |            ^^^
...
52 |     pub async fn mint(&self) -> Result<(), reqwest::Error> {
   |                  ^^^^
...
67 |     pub async fn abort_blocks(&self, block_hash: &str) -> Result<(), reqwest::Error> {
   |                  ^^^^^^^^^^^^

warning: `apibara-starknet` (test "test_reorgs") generated 3 warnings
warning: function `test_starknet_reorgs` is never used
  --> starknet/tests/test_node.rs:24:10
   |
24 | async fn test_starknet_reorgs() {
   |          ^^^^^^^^^^^^^^^^^^^^
   |
   = note: `#[warn(dead_code)]` on by default

warning: `apibara-starknet` (test "test_node") generated 3 warnings (2 duplicates)
    Checking apibara-cli v0.1.0 (/Users/mac/Workspace/OpenSource/dna/cli)
warning: function `test_reorg_from_client_pov_websockets` is never used
  --> starknet/tests/test_websockets.rs:26:10
   |
26 | async fn test_reorg_from_client_pov_websockets() {
   |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: `#[warn(dead_code)]` on by default

warning: `apibara-starknet` (test "test_websockets") generated 3 warnings (2 duplicates)
    Checking apibara-sink-options-derive v0.1.0 (/Users/mac/Workspace/OpenSource/dna/sink-options-derive)
       Fixed sink-postgres/tests/test_sink.rs (1 fix)
    Checking apibara-core v0.1.0 (/Users/mac/Workspace/OpenSource/dna/core)
    Checking apibara-script v0.1.0 (/Users/mac/Workspace/OpenSource/dna/script)
    Checking apibara-sink-common v0.1.0 (/Users/mac/Workspace/OpenSource/dna/sink-common)
warning: failed to automatically apply fixes suggested by rustc to crate `apibara_sink_parquet`

after fixes were automatically applied the compiler reported errors within these files:

  * sink-parquet/src/sink.rs

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/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

The following errors were reported:
error: attempting to skip non-existent parameter
   --> sink-parquet/src/sink.rs:130:29
    |
130 |     #[instrument(skip(self, cursor), err(Debug))]
    |                             ^^^^^^

error: aborting due to previous error

Original diagnostics will follow.

warning: `apibara-sink-parquet` (lib test) generated 1 warning (1 duplicate)
    Checking apibara-sdk v0.1.0 (/Users/mac/Workspace/OpenSource/dna/sdk)
    Checking apibara-observability v0.1.0 (/Users/mac/Workspace/OpenSource/dna/observability)
warning: function `test_apibara_high_level_api` is never used
 --> sdk/tests/test_sdk.rs:7:10
  |
7 | async fn test_apibara_high_level_api() -> Result<(), Box<dyn std::error::Error>> {
  |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: `#[warn(dead_code)]` on by default

warning: `apibara-sdk` (test "test_sdk") generated 1 warning
    Finished dev [unoptimized + debuginfo] target(s) in 22.15s
```

</p>
</details>