]> git.lizzy.rs Git - rust.git/commitdiff
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)
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

1  2 
clippy_lints/src/utils/conf.rs
clippy_utils/src/lib.rs

Simple merge
Simple merge