mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-14 02:49:40 +00:00
![]() 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 |
||
---|---|---|
.. | ||
alias_relate_error_uses_structurally_normalize.rs | ||
alias_relate_error_uses_structurally_normalize.stderr | ||
ambiguous-fail.rs | ||
ambiguous-fail.stderr | ||
ambiguous-pass.rs | ||
ambiguous-pass.stderr | ||
coerce-in-may-coerce.rs | ||
coerce-in-may-coerce.stderr | ||
deeply-normalize-type-expectation.rs | ||
deeply-normalize-type-expectation.stderr | ||
dont-pick-fnptr-bound-as-leaf.current.stderr | ||
dont-pick-fnptr-bound-as-leaf.next.stderr | ||
dont-pick-fnptr-bound-as-leaf.rs | ||
point-at-failing-nested.rs | ||
point-at-failing-nested.stderr | ||
projection-trait-ref.rs | ||
projection-trait-ref.stderr | ||
where-clause-doesnt-apply.rs | ||
where-clause-doesnt-apply.stderr |