Matthias Krüger 389747c41d
Rollup merge of #115882 - aliemjay:diag-name-region-1, r=compiler-errors
improve the suggestion of `generic_bound_failure`

- Fixes #115375
- suggest the bound in the correct scope: trait or impl header vs assoc item. See `tests/ui/suggestions/lifetimes/type-param-bound-scope.rs`
- don't suggest a lifetime name that conflicts with the other late-bound regions of the function:
```rust
type Inv<'a> = *mut &'a ();
fn check_bound<'a, T: 'a>(_: T, _: Inv<'a>) {}
fn test<'a, T>(_: &'a str, t: T, lt: Inv<'_>) { // suggests a new name `'a`
    check_bound(t, lt); //~ ERROR
}
```
2023-10-09 16:26:00 +02:00
..
2023-05-01 16:15:13 +08:00
2023-04-16 11:38:52 +00:00
2023-04-16 11:38:52 +00:00
2023-04-16 11:38:52 +00:00
2023-08-06 13:34:53 +00:00
2023-04-16 11:38:52 +00:00
2023-01-31 17:26:06 +00:00
2023-05-24 19:35:59 -03:00
2023-05-24 19:35:59 -03:00
2023-05-24 19:35:59 -03:00
2023-04-16 11:38:52 +00:00
2023-07-27 15:51:02 +00:00
2023-05-24 19:35:59 -03:00
2023-05-24 19:54:13 -03:00
2023-02-16 11:42:35 -03:00
2023-04-03 15:59:21 +00:00
2023-02-16 11:42:35 -03:00
2023-07-27 15:51:02 +00:00
2023-04-03 15:59:21 +00:00
2023-01-12 02:28:38 +00:00
2023-01-12 02:28:38 +00:00
2023-01-12 02:28:38 +00:00
2023-07-27 15:51:02 +00:00
2023-10-08 10:06:17 +00:00
2023-05-05 20:36:21 +02:00
2023-07-29 11:47:26 +02:00
2023-01-15 19:46:20 +00:00
2023-08-06 13:34:53 +00:00
2023-08-07 17:16:10 +00:00
2023-04-16 11:38:52 +00:00