Open
Description
This is a tracking issue for the RFC "Add support for use Trait::func
" (rust-lang/rfcs#3591).
The feature gate for the issue is #![feature(import_trait_associated_functions)]
.
About tracking issues
Tracking issues are used to record the overall progress of implementation.
They are also used as hubs connecting to other relevant issues, e.g., bugs or open design questions.
A tracking issue is however not meant for large scale discussion, questions, or bug reports about a feature.
Instead, open a dedicated issue for the specific matter and add the relevant feature gate label.
Discussion comments will get marked as off-topic or deleted.
Repeated discussions on the tracking issue may lead to the tracking issue getting locked.
Steps
- Implement the RFCAdjust documentation (see instructions on rustc-dev-guide)Formatting for new syntax has been added to the Style Guide (nightly-style-procedure)Stabilization PR (see instructions on rustc-dev-guide)
Unresolved Questions
Implementation history
Metadata
Metadata
Assignees
Labels
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
crumblingstatue commentedon Dec 23, 2024
Might be worth noting that there is an orthogonal implementation of using a trait function through the unstable
fn_delegation
feature.Although my understanding is that this is just some kind of experiment, and will not be stabilized?
Might be worth taking a look at the implementation though.
use
associated items of traits #134754Rollup merge of rust-lang#134754 - frank-king:feature/import_trait_as…
Rollup merge of rust-lang#134754 - frank-king:feature/import_trait_as…
Unrolled build for rust-lang#134754
Rollup merge of rust-lang#139149 - mejrs:itaf, r=ehuss
Rollup merge of rust-lang#139149 - mejrs:itaf, r=ehuss
Unrolled build for rust-lang#139149
joshtriplett commentedon Apr 29, 2025
We were discussing this feature in a @rust-lang/libs-api meeting. We were wondering if the infrastructure that enables this feature would make it straightforward to provide a (separate) feature allowing
use
of an inherent function or associated constant/type from a concrete type.10 remaining items