rust/crates/hir_def/src
bors[bot] d7db38fff9
Merge #7907
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: 66ec64ccf3/compiler/rustc_typeck/src/check/expr.rs (L1610) 


r? @flodiebold

Co-authored-by: cynecx <me@cynecx.net>
2021-03-24 22:37:48 +00:00
..
body Fix incorrect scoping in while expressions 2021-03-21 01:28:42 +01:00
item_tree Merge #8082 2021-03-18 12:25:44 +00:00
nameres Merge bang-macros and derives in name resolution 2021-03-23 17:23:10 +01:00
path Use upstream cov-mark 2021-03-08 22:19:44 +02:00
adt.rs Make ItemTreeId its own type 2021-03-18 01:53:22 +01:00
attr.rs clippy::complexity simplifications related to Iterators 2021-03-21 13:13:34 +01:00
body.rs Follow established ErrorEmitted pattern 2021-03-16 23:31:14 -07:00
builtin_attr.rs Add builtin macro-like attributes 2021-03-19 14:33:31 +01:00
builtin_type.rs
child_by_source.rs Use body.block_scopes in ChildBySource 2021-03-09 18:27:23 +01:00
data.rs Rename item_tree query to file_item_tree 2021-03-18 01:53:37 +01:00
db.rs hir_def: move visibility queries from hir_ty to hir_def 2021-03-24 23:00:03 +01:00
diagnostics.rs Fix missing unresolved macro diagnostic in function body 2021-03-16 00:52:58 -07:00
dyn_map.rs
expr.rs
find_path.rs Code review fixes 2021-03-22 15:15:53 +02:00
generics.rs Make ItemTreeId its own type 2021-03-18 01:53:22 +01:00
import_map.rs Make MacroDefId's AstId mandatory when possible 2021-03-18 15:37:14 +01:00
item_scope.rs Store an AstId for procedural macros 2021-03-18 16:11:18 +01:00
item_tree.rs Merge #8082 2021-03-18 12:25:44 +00:00
keys.rs
lang_item.rs
lib.rs Rename derive-specific APIs 2021-03-19 14:23:13 +01:00
nameres.rs resolver: manually traverse nested block scopes 2021-03-22 18:55:51 +01:00
path.rs Impl HirDisplay for function hover message 2021-03-16 01:04:20 +08:00
per_ns.rs
resolver.rs resolver: manually traverse nested block scopes 2021-03-22 18:55:51 +01:00
src.rs Make ItemTreeId its own type 2021-03-18 01:53:22 +01:00
test_db.rs Simplify hir_def TestDB 2021-03-13 02:24:53 +01:00
trace.rs
type_ref.rs
visibility.rs hir_def: move visibility queries from hir_ty to hir_def 2021-03-24 23:00:03 +01:00