Repository: rust
Issue: When add irrelevant `use tokio::*`, got compile error : the trait `PartialOrd<&String>` is not implemented for `String`
Labels: A-diagnostics,A-trait-system,T-compiler,C-bug

Thanks very much to review is issue. I have simplifed this buggy code as much as possible.

`a` and `b` are two String,
they can be compared by `a.ge(&b)`   aka.`a > b`
i think that `&b` equals to `&&b`, and the code `a.ge(&&b)` compiles ok as expected.
HOWEVER, when i add `use tokio::*` at the above of code, rust compiler told me an error which says: "the trait `PartialOrd<&String>` is not implemented for `String`"

I tried this code:
```rust
use tokio::*; // comment this line to make it compile ok

fn main() {
    println!("Hello, world!");

    let a = String::from("a");
    let b = String::from("b");

    println!("{:?}", a > b);

    println!("{:?}", a.ge(&b)); // ok
    println!("{:?}", &a.ge(&b)); // ok

    // below compile ok when not `use tokio::*`;
    // when `use tokio::*`, got compile error : the trait `PartialOrd<&String>` is not implemented for `String`
    println!("{:?}", a.ge(&&b));
    println!("{:?}", &a.ge(&&b));
    let rb = &b;
    println!("{:?}", a.ge(&rb));
    println!("{:?}", &a.ge(&rb));
}
```
with Cargo.toml
```toml
[package]
name = "partialcmp_bug_rs"
version = "0.1.0"
edition = "2021"

[dependencies]
tokio = {version="1", features=["full"]}
```

I expected to see this happen: *explanation*
```
Hello, world!
x: 1
x: 1
false
false
false
false
false
false
false
```

Instead, this happened: *explanation*
```
   Compiling partialcmp_bug_rs v0.1.0 (/home/chnlkw/partialcmp_bug_rs)
warning: unused import: `tokio::*`
 --> src/main.rs:1:5
  |
1 | use tokio::*; // comment this line to make it compile ok
  |     ^^^^^^^^
  |
  = note: `#[warn(unused_imports)]` on by default

error[E0277]: can't compare `String` with `&String`
  --> src/main.rs:21:27
   |
21 |     println!("{:?}", a.ge(&&b));
   |                        -- ^^^ no implementation for `String < &String` and `String > &String`
   |                        |
   |                        required by a bound introduced by this call
   |
   = help: the trait `PartialOrd<&String>` is not implemented for `String`
   = help: the following other types implement trait `PartialOrd<Rhs>`:
             <String as PartialOrd<bytes::bytes::Bytes>>
             <String as PartialOrd<bytes::bytes_mut::BytesMut>>
             <String as PartialOrd>

error[E0277]: can't compare `String` with `&String`
  --> src/main.rs:22:28
   |
22 |     println!("{:?}", &a.ge(&&b));
   |                         -- ^^^ no implementation for `String < &String` and `String > &String`
   |                         |
   |                         required by a bound introduced by this call
   |
   = help: the trait `PartialOrd<&String>` is not implemented for `String`
   = help: the following other types implement trait `PartialOrd<Rhs>`:
             <String as PartialOrd<bytes::bytes::Bytes>>
             <String as PartialOrd<bytes::bytes_mut::BytesMut>>
             <String as PartialOrd>

error[E0277]: can't compare `String` with `&String`
  --> src/main.rs:24:27
   |
24 |     println!("{:?}", a.ge(&rb));
   |                        -- ^^^ no implementation for `String < &String` and `String > &String`
   |                        |
   |                        required by a bound introduced by this call
   |
   = help: the trait `PartialOrd<&String>` is not implemented for `String`
   = help: the following other types implement trait `PartialOrd<Rhs>`:
             <String as PartialOrd<bytes::bytes::Bytes>>
             <String as PartialOrd<bytes::bytes_mut::BytesMut>>
             <String as PartialOrd>

error[E0277]: can't compare `String` with `&String`
  --> src/main.rs:25:28
   |
25 |     println!("{:?}", &a.ge(&rb));
   |                         -- ^^^ no implementation for `String < &String` and `String > &String`
   |                         |
   |                         required by a bound introduced by this call
   |
   = help: the trait `PartialOrd<&String>` is not implemented for `String`
   = help: the following other types implement trait `PartialOrd<Rhs>`:
             <String as PartialOrd<bytes::bytes::Bytes>>
             <String as PartialOrd<bytes::bytes_mut::BytesMut>>
             <String as PartialOrd>

For more information about this error, try `rustc --explain E0277`.
warning: `partialcmp_bug_rs` (bin "partialcmp_bug_rs") generated 1 warning
error: could not compile `partialcmp_bug_rs` (bin "partialcmp_bug_rs") due to 4 previous errors; 1 warning emitted
```

### Repo

you can clone this code from [here](https://github.com/chnlkw/partialcmp_bug_rs)

### 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>
rustc 1.69.0 (84c898d65 2023-04-16)
binary: rustc
commit-hash: 84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc
commit-date: 2023-04-16
host: x86_64-unknown-linux-gnu
release: 1.69.0
LLVM version: 15.0.7

rustc 1.71.0-nightly (e9e1bbc7a 2023-05-17)
binary: rustc
commit-hash: e9e1bbc7a820c472b39d3de54b3049bf14050655
commit-date: 2023-05-17
host: x86_64-unknown-linux-gnu
release: 1.71.0-nightly
LLVM version: 16.0.2
```