aboutsummaryrefslogtreecommitdiff
path: root/crates/hir
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2021-02-28 22:54:07 +0000
committerGitHub <[email protected]>2021-02-28 22:54:07 +0000
commit5df3ee8274fdb7cdeb2b0871b4efea8cbf4724a1 (patch)
treec1769a152888b97134e3f3811d4504f467ce1047 /crates/hir
parent72457d022d704c47ab9dbfee6a1b29063cc9cc5d (diff)
parent407196b8c0f23e3ddc26e789b84542b1fd9b0eb8 (diff)
Merge #7816
7816: Lift Ty::Fn into a struct r=Veykril a=Veykril bors r+ Co-authored-by: Lukas Wirth <[email protected]>
Diffstat (limited to 'crates/hir')
-rw-r--r--crates/hir/src/code_model.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/crates/hir/src/code_model.rs b/crates/hir/src/code_model.rs
index 1c31e29ac..5a1691eff 100644
--- a/crates/hir/src/code_model.rs
+++ b/crates/hir/src/code_model.rs
@@ -31,9 +31,9 @@ use hir_ty::{
31 display::{write_bounds_like_dyn_trait_with_prefix, HirDisplayError, HirFormatter}, 31 display::{write_bounds_like_dyn_trait_with_prefix, HirDisplayError, HirFormatter},
32 method_resolution, 32 method_resolution,
33 traits::{FnTrait, Solution, SolutionVariables}, 33 traits::{FnTrait, Solution, SolutionVariables},
34 BoundVar, CallableDefId, Canonical, DebruijnIndex, FnSig, GenericPredicate, InEnvironment, 34 BoundVar, CallableDefId, CallableSig, Canonical, DebruijnIndex, GenericPredicate,
35 Obligation, ProjectionPredicate, ProjectionTy, Scalar, Substs, TraitEnvironment, Ty, TyDefId, 35 InEnvironment, Obligation, ProjectionPredicate, ProjectionTy, Scalar, Substs, TraitEnvironment,
36 TyKind, 36 Ty, TyDefId, TyKind,
37}; 37};
38use rustc_hash::FxHashSet; 38use rustc_hash::FxHashSet;
39use stdx::{format_to, impl_from}; 39use stdx::{format_to, impl_from};
@@ -1692,7 +1692,7 @@ impl Type {
1692 } 1692 }
1693 1693
1694 pub fn is_fn(&self) -> bool { 1694 pub fn is_fn(&self) -> bool {
1695 matches!(&self.ty.value, Ty::FnDef(..) | Ty::FnPtr { .. }) 1695 matches!(&self.ty.value, Ty::FnDef(..) | Ty::Function { .. })
1696 } 1696 }
1697 1697
1698 pub fn is_packed(&self, db: &dyn HirDatabase) -> bool { 1698 pub fn is_packed(&self, db: &dyn HirDatabase) -> bool {
@@ -1974,7 +1974,7 @@ impl HirDisplay for Type {
1974#[derive(Debug)] 1974#[derive(Debug)]
1975pub struct Callable { 1975pub struct Callable {
1976 ty: Type, 1976 ty: Type,
1977 sig: FnSig, 1977 sig: CallableSig,
1978 def: Option<CallableDefId>, 1978 def: Option<CallableDefId>,
1979 pub(crate) is_bound_method: bool, 1979 pub(crate) is_bound_method: bool,
1980} 1980}