diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2025-01-22 19:29:43 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-01-22 19:29:43 +0100 |
| commit | 318466aec070f9200a89059e170f5988c6575600 (patch) | |
| tree | b9698b915b7d9405dded2779995feb3d414f8f49 /compiler/rustc_codegen_gcc | |
| parent | 413f87a1f875e600579259e99b6133c4db81033f (diff) | |
| parent | 3ef506fb4dc9415620d4f09be022834d02201257 (diff) | |
| download | rust-318466aec070f9200a89059e170f5988c6575600.tar.gz rust-318466aec070f9200a89059e170f5988c6575600.zip | |
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
Diffstat (limited to 'compiler/rustc_codegen_gcc')
0 files changed, 0 insertions, 0 deletions
