Repository: rust
Issue: async code fails to compile with `-Znext-solver`
Labels: T-compiler,C-bug,A-async-await,AsyncAwait-Triaged,S-has-mcve,T-types,WG-trait-system-refactor

<!--
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:

```sh
cd $(mktemp -d)
git clone https://github.com/wvwwvwwv/scalable-concurrent-containers.git
cd scalable-concurrent-containers/
git checkout c014a2c7ce98a13237b842bd03b80206ff8bb66e
```

compiling with normal rustc succeeds:
```
cargo +nightly check --locked
    Checking sdd v3.0.2
    Checking scc v2.1.16 (/tmp/tmp.RjDtqDRisT/scalable-concurrent-containers)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.72s
```

using next-solver fails
```
RUSTFLAGS='-Znext-solver'  cargo +nightly check
    Checking sdd v3.0.2
    Checking scc v2.1.16 (/tmp/tmp.RjDtqDRisT/scalable-concurrent-containers)
error: concrete type differs from previous defining opaque type use
    --> src/hash_map.rs:1439:5
     |
1439 |     async fn cleanse_old_array_async(&self, current_array: &BucketArray<K, V, (), SEQUENTIAL>) {
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `{async fn body of hash_map::HashMap<K, V, H>::cleanse_old_array_async()}`, got `{async fn body of hash_map::HashMap<K, V, H>::cleanse_old_array_async()}`
     |
     = note: previous use here

error: concrete type differs from previous defining opaque type use
    --> src/hash_index.rs:1090:5
     |
1090 |     async fn cleanse_old_array_async(&self, current_array: &BucketArray<K, V, (), OPTIMISTIC>) {
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `{async fn body of HashIndex<K, V, H>::cleanse_old_array_async()}`, got `{async fn body of HashIndex<K, V, H>::cleanse_old_array_async()}`
     |
     = note: previous use here

error: concrete type differs from previous defining opaque type use
    --> src/hash_cache.rs:1064:5
     |
1064 | /     async fn cleanse_old_array_async(
1065 | |         &self,
1066 | |         current_array: &BucketArray<K, V, DoublyLinkedList, CACHE>,
1067 | |     ) {
     | |_____^ expected `{async fn body of HashCache<K, V, H>::cleanse_old_array_async()}`, got `{async fn body of HashCache<K, V, H>::cleanse_old_array_async()}`
     |
     = note: previous use here

error: could not compile `scc` (lib) due to 3 previous errors
```

### 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`:
```
cargo 1.82.0-nightly (8f40fc59f 2024-08-21)
release: 1.82.0-nightly
commit-hash: 8f40fc59fb0c8df91c97405785197f3c630304ea
commit-date: 2024-08-21
host: x86_64-unknown-linux-gnu
libgit2: 1.8.1 (sys:0.19.0 vendored)
libcurl: 8.9.0-DEV (sys:0.4.74+curl-8.9.0 vendored ssl:OpenSSL/1.1.1w)
ssl: OpenSSL 1.1.1w  11 Sep 2023
os: Fedora 40.0.0 [64-bit]
```


</p>
</details>

I'm not sure even if it is an issue, but here's report anyway :)