diff options
author | Akshat Agarwal <humancalico@disroot.org> | 2021-02-20 11:07:43 +0530 |
---|---|---|
committer | Philip Herron <herron.philip@googlemail.com> | 2021-02-22 17:11:21 +0000 |
commit | 7f518fb5840c18cdfd27381c37bf6943093ad44b (patch) | |
tree | 2d3b1798d702eebca6b36622d70b666336561b3e /gcc | |
parent | 3673b0b3b729cf4e8f9abe01096ecdfad0ad3d5f (diff) | |
download | gcc-7f518fb5840c18cdfd27381c37bf6943093ad44b.zip gcc-7f518fb5840c18cdfd27381c37bf6943093ad44b.tar.gz gcc-7f518fb5840c18cdfd27381c37bf6943093ad44b.tar.bz2 |
Reformat all files in gcc/rust/typecheck
Signed-off-by: Akshat Agarwal <humancalico@disroot.org>
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/rust/typecheck/rust-hir-type-check-expr.h | 4 | ||||
-rw-r--r-- | gcc/rust/typecheck/rust-hir-type-check-implitem.h | 10 | ||||
-rw-r--r-- | gcc/rust/typecheck/rust-hir-type-check-toplevel.h | 2 | ||||
-rw-r--r-- | gcc/rust/typecheck/rust-hir-type-check-type.h | 6 | ||||
-rw-r--r-- | gcc/rust/typecheck/rust-hir-type-check.h | 3 | ||||
-rw-r--r-- | gcc/rust/typecheck/rust-tyty-call.h | 4 | ||||
-rw-r--r-- | gcc/rust/typecheck/rust-tyty-rules.h | 4 |
7 files changed, 19 insertions, 14 deletions
diff --git a/gcc/rust/typecheck/rust-hir-type-check-expr.h b/gcc/rust/typecheck/rust-hir-type-check-expr.h index 07d0d4c..c9fe26e 100644 --- a/gcc/rust/typecheck/rust-hir-type-check-expr.h +++ b/gcc/rust/typecheck/rust-hir-type-check-expr.h @@ -601,8 +601,8 @@ public: return; } - auto resolved_index_expr = size_ty->unify ( - TypeCheckExpr::Resolve (expr.get_index_expr (), false)); + auto resolved_index_expr + = size_ty->unify (TypeCheckExpr::Resolve (expr.get_index_expr (), false)); if (resolved_index_expr == nullptr) { rust_error_at (expr.get_index_expr ()->get_locus_slow (), diff --git a/gcc/rust/typecheck/rust-hir-type-check-implitem.h b/gcc/rust/typecheck/rust-hir-type-check-implitem.h index b24a280..fa87bee 100644 --- a/gcc/rust/typecheck/rust-hir-type-check-implitem.h +++ b/gcc/rust/typecheck/rust-hir-type-check-implitem.h @@ -72,7 +72,7 @@ public: auto param_tyty = TypeCheckType::Resolve (param.get_type ()); params.push_back ( std::pair<HIR::Pattern *, TyTy::BaseType *> (param.get_param_name (), - param_tyty)); + param_tyty)); context->insert_type (param.get_mappings (), param_tyty); } @@ -115,7 +115,8 @@ public: std::unique_ptr<HIR::Pattern> (nullptr)); context->insert_type (self_param.get_mappings (), self->clone ()); params.push_back ( - std::pair<HIR::Pattern *, TyTy::BaseType *> (self_pattern, self->clone ())); + std::pair<HIR::Pattern *, TyTy::BaseType *> (self_pattern, + self->clone ())); for (auto ¶m : method.get_function_params ()) { @@ -123,7 +124,7 @@ public: auto param_tyty = TypeCheckType::Resolve (param.get_type ()); params.push_back ( std::pair<HIR::Pattern *, TyTy::BaseType *> (param.get_param_name (), - param_tyty)); + param_tyty)); context->insert_type (param.get_mappings (), param_tyty); } @@ -134,7 +135,8 @@ public: } private: - TypeCheckTopLevelImplItem (TyTy::BaseType *self) : TypeCheckBase (), self (self) + TypeCheckTopLevelImplItem (TyTy::BaseType *self) + : TypeCheckBase (), self (self) {} TyTy::BaseType *self; diff --git a/gcc/rust/typecheck/rust-hir-type-check-toplevel.h b/gcc/rust/typecheck/rust-hir-type-check-toplevel.h index 838d2dc..c82abaa 100644 --- a/gcc/rust/typecheck/rust-hir-type-check-toplevel.h +++ b/gcc/rust/typecheck/rust-hir-type-check-toplevel.h @@ -126,7 +126,7 @@ public: auto param_tyty = TypeCheckType::Resolve (param.get_type ()); params.push_back ( std::pair<HIR::Pattern *, TyTy::BaseType *> (param.get_param_name (), - param_tyty)); + param_tyty)); context->insert_type (param.get_mappings (), param_tyty); } diff --git a/gcc/rust/typecheck/rust-hir-type-check-type.h b/gcc/rust/typecheck/rust-hir-type-check-type.h index 74896e2..21f93fb 100644 --- a/gcc/rust/typecheck/rust-hir-type-check-type.h +++ b/gcc/rust/typecheck/rust-hir-type-check-type.h @@ -100,7 +100,8 @@ public: = new HIR::IdentifierPattern (param.get_name (), param.get_locus (), is_ref, is_mut, std::move (to_bind)); - TyTy::BaseType *ptype = TypeCheckType::Resolve (param.get_type ().get ()); + TyTy::BaseType *ptype + = TypeCheckType::Resolve (param.get_type ().get ()); params.push_back ( std::pair<HIR::Pattern *, TyTy::BaseType *> (pattern, ptype)); } @@ -178,7 +179,8 @@ public: void visit (HIR::ReferenceType &type) { - TyTy::BaseType *base = TypeCheckType::Resolve (type.get_base_type ().get ()); + TyTy::BaseType *base + = TypeCheckType::Resolve (type.get_base_type ().get ()); translated = new TyTy::ReferenceType (type.get_mappings ().get_hirid (), base->get_ref ()); } diff --git a/gcc/rust/typecheck/rust-hir-type-check.h b/gcc/rust/typecheck/rust-hir-type-check.h index 753004a..9bc3f3a 100644 --- a/gcc/rust/typecheck/rust-hir-type-check.h +++ b/gcc/rust/typecheck/rust-hir-type-check.h @@ -37,7 +37,8 @@ public: bool lookup_builtin (std::string name, TyTy::BaseType **type); void insert_builtin (HirId id, NodeId ref, TyTy::BaseType *type); - void insert_type (const Analysis::NodeMapping &mappings, TyTy::BaseType *type); + void insert_type (const Analysis::NodeMapping &mappings, + TyTy::BaseType *type); bool lookup_type (HirId id, TyTy::BaseType **type); void insert_type_by_node_id (NodeId ref, HirId id); diff --git a/gcc/rust/typecheck/rust-tyty-call.h b/gcc/rust/typecheck/rust-tyty-call.h index d6e5879..e1f1a8c 100644 --- a/gcc/rust/typecheck/rust-tyty-call.h +++ b/gcc/rust/typecheck/rust-tyty-call.h @@ -32,7 +32,7 @@ class TypeCheckCallExpr : private TyVisitor { public: static BaseType *go (BaseType *ref, HIR::CallExpr &call, - Resolver::TypeCheckContext *context) + Resolver::TypeCheckContext *context) { TypeCheckCallExpr checker (call, context); ref->accept_vis (checker); @@ -76,7 +76,7 @@ class TypeCheckMethodCallExpr : private TyVisitor { public: static BaseType *go (BaseType *ref, HIR::MethodCallExpr &call, - Resolver::TypeCheckContext *context) + Resolver::TypeCheckContext *context) { TypeCheckMethodCallExpr checker (call, context); ref->accept_vis (checker); diff --git a/gcc/rust/typecheck/rust-tyty-rules.h b/gcc/rust/typecheck/rust-tyty-rules.h index 0f58fc0..2479378 100644 --- a/gcc/rust/typecheck/rust-tyty-rules.h +++ b/gcc/rust/typecheck/rust-tyty-rules.h @@ -60,9 +60,9 @@ public: other->accept_vis (*this); if (resolved != nullptr) { - resolved->append_reference (get_base()->get_ref ()); + resolved->append_reference (get_base ()->get_ref ()); resolved->append_reference (other->get_ref ()); - for (auto ref : get_base()->get_combined_refs ()) + for (auto ref : get_base ()->get_combined_refs ()) resolved->append_reference (ref); for (auto ref : other->get_combined_refs ()) resolved->append_reference (ref); |