Inherent associated functions and constants defined on function pointer types won't be found #108270
Labels
A-associated-items
Area: Associated items (types, constants & functions)
A-resolve
Area: Name resolution
C-bug
Category: This is a bug.
F-rustc_attrs
Internal rustc attributes gated on the `#[rustc_attrs]` feature gate.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Since only
core
&std
are allowed to define functions and constants on function pointer types (likefn()
orfor<'a> fn(&'a ()) -> bool
) and since they maybe never will, this issue is of low priority. For other primitive types like!
,()
,bool
etc., inherent associated functions and constants are correctly resolved.Note that the perma-unstable attribute
#![rustc_coherence_is_core]
is used in the reproducer which doesn't come with any language or stability guarantees. However, this issue is not about it but about the fact thatcore
which uses this attribute internally andstd
(which can use#[rustc_allow_incoherent_impl]
) would not be able to properly define associated items on those types. For the same reason, I'm not labeling this as requires-nightly.@rustbot label T-compiler A-resolve A-associated-items
The text was updated successfully, but these errors were encountered: