diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-01-01 19:50:02 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2021-01-01 19:50:02 +0000 |
commit | b4a7caedb066a653560dfe9ec005f20b9e2548c0 (patch) | |
tree | 225492cb0e0a8292d670c8153a548593831fa5c2 /crates/hir_ty/src/lib.rs | |
parent | c92c9fdc52ee04a88ee2950a93afc34b4870616b (diff) | |
parent | 29acd398004555695bbf29eb054b12381e955cbf (diff) |
Merge #7125
7125: Don't emit arg count diagnostics for method calls with unknown receiver r=flodiebold a=flodiebold
Fixes #7098.
Co-authored-by: Florian Diebold <[email protected]>
Diffstat (limited to 'crates/hir_ty/src/lib.rs')
-rw-r--r-- | crates/hir_ty/src/lib.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/crates/hir_ty/src/lib.rs b/crates/hir_ty/src/lib.rs index 357bd92f9..e00c7e176 100644 --- a/crates/hir_ty/src/lib.rs +++ b/crates/hir_ty/src/lib.rs | |||
@@ -791,6 +791,10 @@ impl Ty { | |||
791 | matches!(self, Ty::Apply(ApplicationTy { ctor: TypeCtor::Never, .. })) | 791 | matches!(self, Ty::Apply(ApplicationTy { ctor: TypeCtor::Never, .. })) |
792 | } | 792 | } |
793 | 793 | ||
794 | pub fn is_unknown(&self) -> bool { | ||
795 | matches!(self, Ty::Unknown) | ||
796 | } | ||
797 | |||
794 | /// If this is a `dyn Trait` type, this returns the `Trait` part. | 798 | /// If this is a `dyn Trait` type, this returns the `Trait` part. |
795 | pub fn dyn_trait_ref(&self) -> Option<&TraitRef> { | 799 | pub fn dyn_trait_ref(&self) -> Option<&TraitRef> { |
796 | match self { | 800 | match self { |