Commit ad44a99
committed
Fix traits implemented for function items
This fixes the set of traits implemented for function items. `Fn` family
traits are not implemented in some cases. This is roughly implemented in
[`assemble_fn_pointer_candidates`](https://github.com/rust-lang/rust/blob/8c32e313cccf7df531e2d49ffb8227bb92304aee/compiler/rustc_trait_selection/src/traits/select/candidate_assembly.rs#L553-L585).
I did not include "has variadic", since that also requires unsafe and
extern "C" and is thus covered by the other rules, AFAIK. Could also add
that to CYA, though.
Fixes rust-lang#19681 parent ff45844 commit ad44a99
1 file changed
+7
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
54 | | - | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
55 | 60 | | |
56 | 61 | | |
57 | 62 | | |
| |||
0 commit comments