aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_ty/src/tests/macros.rs
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2021-03-24 22:37:48 +0000
committerGitHub <[email protected]>2021-03-24 22:37:48 +0000
commitd7db38fff9c251c36d0796309b43678bdf9e5bd8 (patch)
tree83b422d45c28e3ae9a2eac550ce8a6048bf5fd71 /crates/hir_ty/src/tests/macros.rs
parent9d81618f11eb403cc0644a22f30648393ec77cf6 (diff)
parentd1156bb52e900c015afd490f509d744c7a5adf10 (diff)
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: https://github.com/rust-lang/rust/blob/66ec64ccf31883cd2c28d045912a76179c0c6ed2/compiler/rustc_typeck/src/check/expr.rs#L1610 r? @flodiebold Co-authored-by: cynecx <[email protected]>
Diffstat (limited to 'crates/hir_ty/src/tests/macros.rs')
-rw-r--r--crates/hir_ty/src/tests/macros.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/hir_ty/src/tests/macros.rs b/crates/hir_ty/src/tests/macros.rs
index 12951fb16..7eda51866 100644
--- a/crates/hir_ty/src/tests/macros.rs
+++ b/crates/hir_ty/src/tests/macros.rs
@@ -31,12 +31,12 @@ struct S;
31 31
32#[cfg(not(test))] 32#[cfg(not(test))]
33impl S { 33impl S {
34 fn foo3(&self) -> i32 { 0 } 34 pub fn foo3(&self) -> i32 { 0 }
35} 35}
36 36
37#[cfg(test)] 37#[cfg(test)]
38impl S { 38impl S {
39 fn foo4(&self) -> i32 { 0 } 39 pub fn foo4(&self) -> i32 { 0 }
40} 40}
41"#, 41"#,
42 ); 42 );