rust-analyzer/crates/hir_ty/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
..
diagnostics Fix infinite recursion when computing diagnostics for inner items 2021-03-18 20:15:06 +01:00
infer Merge #7907 2021-03-24 22:37:48 +00:00
tests Merge #7907 2021-03-24 22:37:48 +00:00
traits Fix chalk_ir assertion 2021-03-24 23:10:13 +01:00
autoderef.rs Align InEnvironment with Chalk 2021-03-21 20:19:07 +01:00
chalk_cast.rs Turn Obligation into something similar to chalk_ir::DomainGoal 2021-03-20 12:47:12 +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 Prefer names from outer DefMap over extern prelude 2021-03-10 16:33:18 +01:00
display.rs Merge #8144 2021-03-22 12:35:44 +00:00
infer.rs Align InEnvironment with Chalk 2021-03-21 20:19:07 +01:00
lib.rs Fix chalk_ir assertion 2021-03-24 23:10:13 +01:00
lower.rs Fix chalk_ir assertion 2021-03-24 23:10:13 +01:00
method_resolution.rs Merge #7907 2021-03-24 22:37:48 +00:00
op.rs Separate Ty and TyKind like in Chalk 2021-03-13 16:17:15 +01:00
primitive.rs Use chalk_ir::Scalar directly 2021-02-28 11:06:37 +01:00
test_db.rs Create all ModuleIds through a DefMap method 2021-01-25 15:21:33 +01:00
tests.rs Test for a Salsa bug 2021-03-21 13:33:06 +01:00
traits.rs Align InEnvironment with Chalk 2021-03-21 20:19:07 +01:00
utils.rs Fix chalk_ir assertion 2021-03-24 23:10:13 +01:00