- 
                Notifications
    
You must be signed in to change notification settings  - Fork 13.9k
 
          Implement use associated items of traits
          #134754
        
          New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
  
    Implement use associated items of traits
  
  #134754
              Conversation
      
        
              This comment has been minimized.
        
        
      
    
  This comment has been minimized.
| 
           cc @petrochenkov as this PR has some non-trivial resolve changes.  | 
    
dc2bdee    to
    6905a19      
    Compare
  
    
      
        
              This comment has been minimized.
        
        
      
    
  This comment has been minimized.
8606eb3    to
    72bc889      
    Compare
  
    d79e0e1    to
    2427364      
    Compare
  
    39b3949    to
    e249e6c      
    Compare
  
    | 
           Some changes occurred to the intrinsics. Make sure the CTFE / Miri interpreter cc @rust-lang/miri, @rust-lang/wg-const-eval Some changes occurred to the CTFE / Miri interpreter cc @rust-lang/miri Some changes occurred to the CTFE machinery cc @rust-lang/wg-const-eval The Miri subtree was changed cc @rust-lang/miri  | 
    
e249e6c    to
    5079acc      
    Compare
  
    | 
           @bors r+  | 
    
…sociated_functions, r=oli-obk Implement `use` associated items of traits This PR implements rust-lang#134691.
…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
…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
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.
unstable book: document import_trait_associated_functions Documents rust-lang#134691 which was implemented in rust-lang#134754
unstable book: document import_trait_associated_functions Documents rust-lang#134691 which was implemented in rust-lang#134754
Rollup merge of rust-lang#139149 - mejrs:itaf, r=ehuss unstable book: document import_trait_associated_functions Documents rust-lang#134691 which was implemented in rust-lang#134754
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.
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.
This PR implements #134691.