Implement `use` associated items of traits by frank-king · Pull Request #134754 · rust-lang/rust

@rustbot rustbot added S-waiting-on-review

Status: Awaiting review from the assignee but also interested parties.

T-compiler

Relevant to the compiler team, which will review and decide on the PR/issue.

labels

Dec 25, 2024

frank-king

fmease

fmease

oli-obk

frank-king

oli-obk

@rustbot rustbot added S-waiting-on-author

Status: This is awaiting some action (such as code changes or more information) from the author.

and removed S-waiting-on-review

Status: Awaiting review from the assignee but also interested parties.

labels

Jan 16, 2025

@frank-king

@bors bors added S-waiting-on-bors

Status: Waiting on bors to run and complete tests. Bors will change the label on completion.

and removed S-waiting-on-author

Status: This is awaiting some action (such as code changes or more information) from the author.

labels

Jan 16, 2025

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request

Jan 16, 2025
…sociated_functions, r=oli-obk

Implement `use` associated items of traits

This PR implements rust-lang#134691.

bors added a commit to rust-lang-ci/rust that referenced this pull request

Jan 16, 2025
…iaskrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#133720 ([cfg_match] Adjust syntax)
 - rust-lang#134496 (Update documentation for Arc::from_raw, Arc::increment_strong_count, and Arc::decrement_strong_count to clarify allocator requirement)
 - rust-lang#134754 (Implement `use` associated items of traits)
 - rust-lang#135249 (Fix overflows in the implementation of `overflowing_literals` lint's help)
 - rust-lang#135251 (Only treat plain literal patterns as short)
 - rust-lang#135556 (Clarify note in `std::sync::LazyLock` example)
 - rust-lang#135560 (Update `compiler-builtins` to 0.1.144)

r? `@ghost`
`@rustbot` modify labels: rollup

@bors bors added S-waiting-on-author

Status: This is awaiting some action (such as code changes or more information) from the author.

and removed S-waiting-on-bors

Status: Waiting on bors to run and complete tests. Bors will change the label on completion.

labels

Jan 16, 2025

@bors bors added S-waiting-on-bors

Status: Waiting on bors to run and complete tests. Bors will change the label on completion.

and removed S-waiting-on-author

Status: This is awaiting some action (such as code changes or more information) from the author.

labels

Jan 16, 2025

bors added a commit to rust-lang-ci/rust that referenced this pull request

Jan 16, 2025
…iaskrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#134754 (Implement `use` associated items of traits)
 - rust-lang#135481 (coverage: Completely overhaul counter assignment, using node-flow graphs)
 - rust-lang#135504 (Allow coercing safe-to-call target_feature functions to safe fn pointers)
 - rust-lang#135561 (Update docs for `-Clink-dead-code` to discourage its use)
 - rust-lang#135574 (ci: mirror ubuntu:22.04 to ghcr.io)
 - rust-lang#135585 (resolve symlinks of LLVM tool binaries before copying them)
 - rust-lang#135588 (Add license-metadata.json to rustc-src tarball.)

r? `@ghost`
`@rustbot` modify labels: rollup

rust-timer added a commit to rust-lang-ci/rust that referenced this pull request

Jan 17, 2025
Rollup merge of rust-lang#134754 - frank-king:feature/import_trait_associated_functions, r=oli-obk

Implement `use` associated items of traits

This PR implements rust-lang#134691.

This was referenced

Mar 19, 2025

@mejrs mejrs mentioned this pull request

Mar 30, 2025

m-ou-se added a commit to m-ou-se/rust that referenced this pull request

Apr 3, 2025

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request

Apr 3, 2025

rust-timer added a commit to rust-lang-ci/rust that referenced this pull request

Apr 3, 2025

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request

May 3, 2025
resolve: Support imports of associated types and glob imports from traits

Follow up to rust-lang#134754, part of rust-lang#134691.
This PR also closes rust-lang#138711 now.

Prohibiting `use Trait::AssocType;` at name resolution stage doesn't make sense, the name itself is perfectly resolveable.
It's a type checker's problem that the necessary generic args are not passed when the imported `AssocType` is used, so an error should be reported there.

And since we can import associated trait items now, glob imports from traits can also be allowed.

rust-timer added a commit to rust-lang-ci/rust that referenced this pull request

May 3, 2025
Rollup merge of rust-lang#138712 - petrochenkov:impasst, r=fmease

resolve: Support imports of associated types and glob imports from traits

Follow up to rust-lang#134754, part of rust-lang#134691.
This PR also closes rust-lang#138711 now.

Prohibiting `use Trait::AssocType;` at name resolution stage doesn't make sense, the name itself is perfectly resolveable.
It's a type checker's problem that the necessary generic args are not passed when the imported `AssocType` is used, so an error should be reported there.

And since we can import associated trait items now, glob imports from traits can also be allowed.