diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-11-02 13:08:53 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2020-11-02 13:08:53 +0000 |
commit | 731b38fa3c1694648e6c8e60f61820f9783343eb (patch) | |
tree | b3f4e94e8eac9bb24296aacafacb100930bee59e /crates/hir_ty/src/infer/expr.rs | |
parent | 6507877e7039d4517682a4fc232356662f509d81 (diff) | |
parent | b6101184537b1165cfdd5fc473e04ad4c5b7bffa (diff) |
Merge #6438
6438: Deny unreachable-pub r=matklad a=matklad
It's very useful when `pub` is equivalent to "this is crate's public
API", let's enforce this!
Ideally, we should enforce it for local `cargo test`, and only during
CI, but that needs https://github.com/rust-lang/cargo/issues/5034.
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/hir_ty/src/infer/expr.rs')
-rw-r--r-- | crates/hir_ty/src/infer/expr.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/hir_ty/src/infer/expr.rs b/crates/hir_ty/src/infer/expr.rs index 8ac4cf89a..605951b10 100644 --- a/crates/hir_ty/src/infer/expr.rs +++ b/crates/hir_ty/src/infer/expr.rs | |||
@@ -107,7 +107,7 @@ impl<'a> InferenceContext<'a> { | |||
107 | } | 107 | } |
108 | } | 108 | } |
109 | 109 | ||
110 | pub fn callable_sig(&mut self, ty: &Ty, num_args: usize) -> Option<(Vec<Ty>, Ty)> { | 110 | pub(crate) fn callable_sig(&mut self, ty: &Ty, num_args: usize) -> Option<(Vec<Ty>, Ty)> { |
111 | match ty.callable_sig(self.db) { | 111 | match ty.callable_sig(self.db) { |
112 | Some(sig) => Some((sig.params().to_vec(), sig.ret().clone())), | 112 | Some(sig) => Some((sig.params().to_vec(), sig.ret().clone())), |
113 | None => self.callable_sig_from_fn_trait(ty, num_args), | 113 | None => self.callable_sig_from_fn_trait(ty, num_args), |