Repository: rust
Issue: After fixes were automatically applied the compiler reported errors within the file.
Labels: A-diagnostics,T-compiler,C-bug,D-invalid-suggestion

<!--
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
use tokio::pin; // tokio = { version = "0.2", features = ["full"] }
use std::io;

async fn my_async_fn()  -> io::Result<()> {
    // async logic here
    Ok(())
}

#[tokio::main]
async fn main() {
    let future = my_async_fn();
    pin!(future);

    // (&mut future).await;
}
```

I expected to see this happen: *cargo fix*

Instead, this happened: 
```sh
warning: failed to automatically apply fixes suggested by rustc to crate `test_cargo_fix`

after fixes were automatically applied the compiler reported errors within these files:

  * src/main.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[E0425]: cannot find value `_future` in this scope
  --> src/main.rs:12:10
   |
12 |     pin!(_future);
   |          ^^^^^^^ help: a local variable with a similar name exists: `future`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0425`.
Original diagnostics will follow.

warning: unused variable: `future`
  --> src/main.rs:12:10
   |
12 |     pin!(future);
   |          ^^^^^^ help: if this is intentional, prefix it with an underscore: `_future`
   |
   = note: `#[warn(unused_variables)]` on by default
```

### 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`:
```
rustc 1.53.0 (53cb7b09b 2021-06-17)
binary: rustc
commit-hash: 53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b
commit-date: 2021-06-17
host: x86_64-unknown-linux-gnu
release: 1.53.0
LLVM version: 12.0.1
```

<!--
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>

```sh
# RUST_BACKTRACE=1 cargo fix --broken-code
error[E0425]: cannot find value `_future` in this scope
  --> src/main.rs:12:10
   |
12 |     pin!(_future);
   |          ^^^^^^^ help: a local variable with a similar name exists: `future`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0425`.
error: could not compile `test_cargo_fix`

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error[E0425]: cannot find value `_future` in this scope
  --> src/main.rs:12:10
   |
12 |     pin!(_future);
   |          ^^^^^^^ help: a local variable with a similar name exists: `future`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0425`.
error: build failed
```

</p>
</details>