os-rust/tests/rustdoc-ui/issues
Esteban Küber 781e86477c Suggest trait bounds for used associated type on type param
Fix #101351.

When an associated type on a type parameter is used, and the type
parameter isn't constrained by the correct trait, suggest the
appropriate trait bound:

```
error[E0220]: associated type `Associated` not found for `T`
 --> file.rs:6:15
  |
6 |     field: T::Associated,
  |               ^^^^^^^^^^ there is a similarly named associated type `Associated` in the trait `Foo`
  |
help: consider restricting type parameter `T`
  |
5 | struct Generic<T: Foo> {
  |                 +++++
  ```

When an associated type on a type parameter has a typo, suggest fixing
it:

```
error[E0220]: associated type `Baa` not found for `T`
  --> $DIR/issue-55673.rs:9:8
   |
LL |     T::Baa: std::fmt::Debug,
   |        ^^^ there is a similarly named associated type `Bar` in the trait `Foo`
   |
help: change the associated type name to use `Bar` from `Foo`
   |
LL |     T::Bar: std::fmt::Debug,
   |        ~~~
```
2023-10-13 19:13:56 +00:00
..
auxiliary Move some rustdoc-ui tests to subdirectories 2023-04-29 11:36:19 -05:00
issue-58473-2.rs Move some rustdoc-ui tests to subdirectories 2023-04-29 11:36:19 -05:00
issue-58473.rs Move some rustdoc-ui tests to subdirectories 2023-04-29 11:36:19 -05:00
issue-61592-2.rs Move some rustdoc-ui tests to subdirectories 2023-04-29 11:36:19 -05:00
issue-61592-2.stderr Move some rustdoc-ui tests to subdirectories 2023-04-29 11:36:19 -05:00
issue-61592.rs Move some rustdoc-ui tests to subdirectories 2023-04-29 11:36:19 -05:00
issue-61592.stderr Move some rustdoc-ui tests to subdirectories 2023-04-29 11:36:19 -05:00
issue-61732.rs Move some rustdoc-ui tests to subdirectories 2023-04-29 11:36:19 -05:00
issue-61732.stderr Move some rustdoc-ui tests to subdirectories 2023-04-29 11:36:19 -05:00
issue-74134.private.stderr Move some rustdoc-ui tests to subdirectories 2023-04-29 11:36:19 -05:00
issue-74134.public.stderr Move some rustdoc-ui tests to subdirectories 2023-04-29 11:36:19 -05:00
issue-74134.rs Move some rustdoc-ui tests to subdirectories 2023-04-29 11:36:19 -05:00
issue-79465.rs Move some rustdoc-ui tests to subdirectories 2023-04-29 11:36:19 -05:00
issue-79465.stderr Move some rustdoc-ui tests to subdirectories 2023-04-29 11:36:19 -05:00
issue-79467.rs Move some rustdoc-ui tests to subdirectories 2023-04-29 11:36:19 -05:00
issue-79467.stderr Move some rustdoc-ui tests to subdirectories 2023-04-29 11:36:19 -05:00
issue-79494.rs Move some rustdoc-ui tests to subdirectories 2023-04-29 11:36:19 -05:00
issue-79494.stderr Move some rustdoc-ui tests to subdirectories 2023-04-29 11:36:19 -05:00
issue-80992.rs Move some rustdoc-ui tests to subdirectories 2023-04-29 11:36:19 -05:00
issue-80992.stdout Move some rustdoc-ui tests to subdirectories 2023-04-29 11:36:19 -05:00
issue-81662-shortness.rs Move some rustdoc-ui tests to subdirectories 2023-04-29 11:36:19 -05:00
issue-81662-shortness.stdout Move some rustdoc-ui tests to subdirectories 2023-04-29 11:36:19 -05:00
issue-83883-describe-lints.rs Move some rustdoc-ui tests to subdirectories 2023-04-29 11:36:19 -05:00
issue-83883-describe-lints.stdout Move some rustdoc-ui tests to subdirectories 2023-04-29 11:36:19 -05:00
issue-91134.rs Move some rustdoc-ui tests to subdirectories 2023-04-29 11:36:19 -05:00
issue-91134.stdout Move some rustdoc-ui tests to subdirectories 2023-04-29 11:36:19 -05:00
issue-91713.rs Move some rustdoc-ui tests to subdirectories 2023-04-29 11:36:19 -05:00
issue-91713.stderr Move some rustdoc-ui tests to subdirectories 2023-04-29 11:36:19 -05:00
issue-91713.stdout Add tests for custom_code_classes_in_docs feature 2023-09-15 21:32:28 +02:00
issue-96287.rs Move some rustdoc-ui tests to subdirectories 2023-04-29 11:36:19 -05:00
issue-96287.stderr Suggest trait bounds for used associated type on type param 2023-10-13 19:13:56 +00:00
issue-98690.rs Move some rustdoc-ui tests to subdirectories 2023-04-29 11:36:19 -05:00
issue-98690.stderr Move some rustdoc-ui tests to subdirectories 2023-04-29 11:36:19 -05:00
issue-101076.rs Move some rustdoc-ui tests to subdirectories 2023-04-29 11:36:19 -05:00
issue-102986.rs Move some rustdoc-ui tests to subdirectories 2023-04-29 11:36:19 -05:00
issue-102986.stderr Move some rustdoc-ui tests to subdirectories 2023-04-29 11:36:19 -05:00
issue-103997.rs Move some rustdoc-ui tests to subdirectories 2023-04-29 11:36:19 -05:00
issue-103997.stderr Move some rustdoc-ui tests to subdirectories 2023-04-29 11:36:19 -05:00
issue-105334.rs Move some rustdoc-ui tests to subdirectories 2023-04-29 11:36:19 -05:00
issue-105334.stderr Move some rustdoc-ui tests to subdirectories 2023-04-29 11:36:19 -05:00
issue-105737.rs Move some rustdoc-ui tests to subdirectories 2023-04-29 11:36:19 -05:00
issue-105737.stderr Move some rustdoc-ui tests to subdirectories 2023-04-29 11:36:19 -05:00
issue-105742.rs Don't use implied trait predicates in gather_explicit_predicates_of 2023-05-01 15:45:28 +00:00
issue-105742.stderr Add a note to duplicate diagnostics 2023-10-05 01:04:41 +00:00
issue-106213.rs Move some rustdoc-ui tests to subdirectories 2023-04-29 11:36:19 -05:00
issue-106213.stderr Move some rustdoc-ui tests to subdirectories 2023-04-29 11:36:19 -05:00
issue-106226.rs Move some rustdoc-ui tests to subdirectories 2023-04-29 11:36:19 -05:00
issue-106226.stderr Move some rustdoc-ui tests to subdirectories 2023-04-29 11:36:19 -05:00
issue-107918.rs Move some rustdoc-ui tests to subdirectories 2023-04-29 11:36:19 -05:00
issue-109282-import-inline-merge.rs Move some rustdoc-ui tests to subdirectories 2023-04-29 11:36:19 -05:00
issue-110900.rs Move some rustdoc-ui tests to subdirectories 2023-04-29 11:36:19 -05:00