rust/tests/ui/traits/next-solver/diagnostics
Matthias Krüger 318466aec0
Rollup merge of #135866 - BoxyUwU:dont_pick_fnptr_nested_goals, r=lcnr
Don't pick `T: FnPtr` nested goals as the leaf goal in diagnostics for new solver

r? `@lcnr`

See `tests/ui/traits/next-solver/diagnostics/dont-pick-fnptr-bound-as-leaf.rs` for a minimized example of what code this affects the diagnostics off. The output of running nightly `-Znext-solver` on that test is the following:
```
error[E0277]: the trait bound `Foo: Trait` is not satisfied
  --> src/lib.rs:14:20
   |
14 |     requires_trait(Foo);
   |     -------------- ^^^ the trait `FnPtr` is not implemented for `Foo`
   |     |
   |     required by a bound introduced by this call
   |
note: required for `Foo` to implement `Trait`
  --> src/lib.rs:7:16
   |
7  | impl<T: FnPtr> Trait for T {}
   |         -----  ^^^^^     ^
   |         |
   |         unsatisfied trait bound introduced here
note: required by a bound in `requires_trait`
  --> src/lib.rs:11:22
   |
11 | fn requires_trait<T: Trait>(_: T) {}
   |                      ^^^^^ required by this bound in `requires_trait`
```

Part of rust-lang/trait-system-refactor-initiative#148
2025-01-22 19:29:43 +01:00
..
alias_relate_error_uses_structurally_normalize.rs Use structurally_normalize instead of manual normalizes-to goals 2025-01-22 07:04:53 +00:00
alias_relate_error_uses_structurally_normalize.stderr Use structurally_normalize instead of manual normalizes-to goals 2025-01-22 07:04:53 +00:00
ambiguous-fail.rs Don't ICE because recomputing overflow goals during find_best_leaf_obligation causes inference side-effects 2024-05-16 10:00:11 -04:00
ambiguous-fail.stderr Don't ICE because recomputing overflow goals during find_best_leaf_obligation causes inference side-effects 2024-05-16 10:00:11 -04:00
ambiguous-pass.rs Don't ICE because recomputing overflow goals during find_best_leaf_obligation causes inference side-effects 2024-05-16 10:00:11 -04:00
ambiguous-pass.stderr Don't ICE because recomputing overflow goals during find_best_leaf_obligation causes inference side-effects 2024-05-16 10:00:11 -04:00
coerce-in-may-coerce.rs Structurally resolve in may_coerce 2024-10-15 20:44:39 -04:00
coerce-in-may-coerce.stderr Structurally resolve in may_coerce 2024-10-15 20:44:39 -04:00
deeply-normalize-type-expectation.rs Deeply normalize type trace in type error reporting 2024-10-24 02:48:28 +00:00
deeply-normalize-type-expectation.stderr Deeply normalize type trace in type error reporting 2024-10-24 02:48:28 +00:00
dont-pick-fnptr-bound-as-leaf.current.stderr Don't pick T: FnPtr nested goals 2025-01-22 06:55:38 +00:00
dont-pick-fnptr-bound-as-leaf.next.stderr Don't pick T: FnPtr nested goals 2025-01-22 06:55:38 +00:00
dont-pick-fnptr-bound-as-leaf.rs Don't pick T: FnPtr nested goals 2025-01-22 06:55:38 +00:00
point-at-failing-nested.rs
point-at-failing-nested.stderr Remove detail from label/note that is already available in other note 2024-10-29 16:26:57 +00:00
projection-trait-ref.rs Walk into alias-eq nested goals even if normalization fails 2024-06-12 19:03:37 -04:00
projection-trait-ref.stderr reword trait bound suggestion message to include the bounds 2024-12-07 21:26:20 +00:00
where-clause-doesnt-apply.rs
where-clause-doesnt-apply.stderr Remove detail from label/note that is already available in other note 2024-10-29 16:26:57 +00:00