]> git.lizzy.rs Git - rust.git/commit
Auto merge of #9800 - Alexendoo:def_path_res_multiple, r=dswij
authorbors <bors@rust-lang.org>
Sat, 19 Nov 2022 09:05:50 +0000 (09:05 +0000)
committerbors <bors@rust-lang.org>
Sat, 19 Nov 2022 09:05:50 +0000 (09:05 +0000)
commitf60186f35d5f6d77101b21e7c574531d2f366561
treecb1da7fe787c68779fe6bff68793145233bc9695
parente144c7d1aefd0b789adf1c98b96068cebdb11405
parent1e1ac2b4985a1236003ef23b92e3edf3af8f5dfe
Auto merge of #9800 - Alexendoo:def_path_res_multiple, r=dswij

Return multiple resolutions from `def_path_res`

Changes `def_path_res` to return all the resolutions matching the path rather than the first one (with a namespace hint that covered some cases).  This would fix any issues that come up with multiple versions of the same crate being present as they all have the same crate name

It also adds resolution of `impl _ {}` items for local items, and removes struct field resolution as it didn't seem to be used anywhere

I tested it on a local crate and it worked for the multiple crate issue, but I couldn't come up with a test that worked well with `// aux-build`, maybe `// aux-crate` after https://github.com/rust-lang/rust/pull/103266 could work but I'm not sure on that either

changelog: [`disallowed_methods`], [`disallowed_types`], [`disallowed_macros`]: fix path resolution with multiple versions of the same crate
changelog: [`disallowed_methods`]: Resolve methods in `impl`s in the current crate
clippy_lints/src/utils/conf.rs
clippy_utils/src/lib.rs