]> git.lizzy.rs Git - rust.git/commit - src/tools/rust-analyzer
Auto merge of #92441 - cjgillot:resolve-trait-impl-item, r=matthewjasper
authorbors <bors@rust-lang.org>
Sat, 15 Jan 2022 14:43:45 +0000 (14:43 +0000)
committerbors <bors@rust-lang.org>
Sat, 15 Jan 2022 14:43:45 +0000 (14:43 +0000)
commitec4bcaac450279b029f3480b8b8f1b82ab36a5eb
tree7868ce973b848dee601867b72239114eb6225c22
parentb13a5bf3c4d66ce375f5978c2c2233f9714b721e
parent441c1a6c50cab4b010d03ceb9a7b616487720b1f
Auto merge of #92441 - cjgillot:resolve-trait-impl-item, r=matthewjasper

Link impl items to corresponding trait items in late resolver.

Hygienically linking trait impl items to declarations in the trait can be done directly by the late resolver. In fact, it is already done to diagnose unknown items.

This PR uses this resolution work and stores the `DefId` of the trait item in the HIR. This avoids having to do this resolution manually later.

r? `@matthewjasper`
Related to #90639. The added `trait_item_id` field can be moved to `ImplItemRef` to be used directly by your PR.
compiler/rustc_hir/src/hir.rs
compiler/rustc_resolve/src/late.rs
compiler/rustc_resolve/src/lib.rs
compiler/rustc_typeck/src/astconv/mod.rs
compiler/rustc_typeck/src/check/method/mod.rs
compiler/rustc_typeck/src/check/method/suggest.rs