Skip to content

HRTB variants are missing a std::fmt::Pointer impl #50280

@jimy-byerley

Description

@jimy-byerley

It seems that there is a missing implementation of std::fmt::Pointer on some function pointers:

function pointers like fn test() -> f32 can be passed as argument to println!("{:p}", ...)
but function pointers like fn test(Vec<T> a) -> f32 can't because it's a HRTB variant.

see https://users.rust-lang.org/t/display-function-pointer/17073 for more details.

Metadata

Metadata

Assignees

Labels

A-higher-rankedArea: Higher-ranked things (e.g., lifetimes, types, trait bounds aka HRTBs)A-trait-systemArea: Trait systemC-enhancementCategory: An issue proposing an enhancement or a PR with one.E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.T-typesRelevant to the types team, which will review and decide on the PR/issue.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions