rust/tests/ui/error-codes
Alexander Zhang 48167bd4bd Avoid guessing unknown trait impl in suggestions
When a trait is used without specifying the implementation (e.g. calling
a non-member associated function without fully-qualified syntax) and
there are multiple implementations available, use a placeholder comment
for the implementation type in the suggestion instead of picking a
random implementation.

Example:

```
fn main() {
    let _ = Default::default();
}
```

Previous output:

```
error[E0790]: cannot call associated function on trait without specifying the corresponding `impl` type
 --> test.rs:2:13
  |
2 |     let _ = Default::default();
  |             ^^^^^^^^^^^^^^^^ cannot call associated function of trait
  |
help: use a fully-qualified path to a specific available implementation (273 found)
  |
2 |     let _ = <FileTimes as Default>::default();
  |             +++++++++++++        +
```

New output:

```
error[E0790]: cannot call associated function on trait without specifying the corresponding `impl` type
 --> test.rs:2:13
  |
2 |     let _ = Default::default();
  |             ^^^^^^^^^^^^^^^^ cannot call associated function of trait
  |
help: use a fully-qualified path to a specific available implementation (273 found)
  |
2 |     let _ = </* self type */ as Default>::default();
  |             +++++++++++++++++++        +
```
2023-06-22 16:37:52 -07:00
..
2023-04-03 15:59:21 +00:00
2023-04-17 16:09:18 -04:00
2023-04-03 15:59:21 +00:00
2023-04-03 15:59:21 +00:00
2023-04-03 15:59:21 +00:00
2023-01-30 20:12:19 +00:00
2023-03-08 00:00:18 +00:00
2023-03-08 00:00:18 +00:00
2023-03-08 00:00:18 +00:00
2023-01-11 14:40:02 -08:00
2023-01-15 19:46:20 +00:00
2023-01-15 19:46:20 +00:00
2023-01-15 19:46:20 +00:00
2023-01-15 19:46:20 +00:00
2023-02-06 06:58:30 -05:00
2023-06-05 21:00:08 +00:00
2023-01-15 19:46:20 +00:00
2023-01-18 13:14:56 +13:00
2023-05-05 21:42:54 +01:00
2023-01-23 20:38:14 +13:00
2023-01-23 20:38:14 +13:00