d7db38fff9
7907: Autoderef with visibility r=cynecx a=cynecx
Fixes https://github.com/rust-analyzer/rust-analyzer/issues/7841.
I am not sure about the general approach here. Right now this simply tries to check whether the autoderef candidate is reachable from the current module. ~~However this doesn't exactly work with traits (see the `tests::macros::infer_derive_clone_in_core` test, which fails right now).~~ see comment below
Refs:
- `rustc_typeck` checking fields:
|
||
---|---|---|
.. | ||
body | ||
item_tree | ||
nameres | ||
path | ||
adt.rs | ||
attr.rs | ||
body.rs | ||
builtin_attr.rs | ||
builtin_type.rs | ||
child_by_source.rs | ||
data.rs | ||
db.rs | ||
diagnostics.rs | ||
dyn_map.rs | ||
expr.rs | ||
find_path.rs | ||
generics.rs | ||
import_map.rs | ||
item_scope.rs | ||
item_tree.rs | ||
keys.rs | ||
lang_item.rs | ||
lib.rs | ||
nameres.rs | ||
path.rs | ||
per_ns.rs | ||
resolver.rs | ||
src.rs | ||
test_db.rs | ||
trace.rs | ||
type_ref.rs | ||
visibility.rs |