Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

typecheck-path: Fix typo (reciever -> receiver) #3317

Merged
merged 1 commit into from
Dec 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions gcc/rust/typecheck/rust-hir-path-probe.cc
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ PathProbeType::Probe (const TyTy::BaseType *receiver,
if (!probe_bounds)
return probe.candidates;

if (!probe.is_reciever_generic ())
if (!probe.is_receiver_generic ())
{
std::vector<std::pair<TraitReference *, HIR::ImplBlock *>> probed_bounds
= TypeBoundsProbe::Probe (receiver);
Expand Down Expand Up @@ -433,7 +433,7 @@ PathProbeType::union_bounds (
}

bool
PathProbeType::is_reciever_generic () const
PathProbeType::is_receiver_generic () const
{
const TyTy::BaseType *root = receiver->get_root ();
bool receiver_is_type_param = root->get_kind () == TyTy::TypeKind::PARAM;
Expand Down
2 changes: 1 addition & 1 deletion gcc/rust/typecheck/rust-hir-path-probe.h
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ class PathProbeType : public TypeCheckBase, public HIR::HIRImplVisitor
const std::vector<std::pair<const TraitReference *, HIR::ImplBlock *>> b)
const;

bool is_reciever_generic () const;
bool is_receiver_generic () const;

const TyTy::BaseType *receiver;
const HIR::PathIdentSegment &search;
Expand Down
10 changes: 5 additions & 5 deletions gcc/rust/typecheck/rust-hir-type-check-path.cc
Original file line number Diff line number Diff line change
Expand Up @@ -354,13 +354,13 @@ TypeCheckExpr::resolve_segments (NodeId root_resolved_node_id,
{
NodeId resolved_node_id = root_resolved_node_id;
TyTy::BaseType *prev_segment = tyseg;
bool reciever_is_generic = prev_segment->get_kind () == TyTy::TypeKind::PARAM;
bool reciever_is_dyn = prev_segment->get_kind () == TyTy::TypeKind::DYNAMIC;
bool receiver_is_generic = prev_segment->get_kind () == TyTy::TypeKind::PARAM;
bool receiver_is_dyn = prev_segment->get_kind () == TyTy::TypeKind::DYNAMIC;

for (size_t i = offset; i < segments.size (); i++)
{
HIR::PathExprSegment &seg = segments.at (i);
bool probe_impls = !reciever_is_generic;
bool probe_impls = !receiver_is_generic;

// probe the path is done in two parts one where we search impls if no
// candidate is found then we search extensions from traits
Expand Down Expand Up @@ -435,7 +435,7 @@ TypeCheckExpr::resolve_segments (NodeId root_resolved_node_id,
}
}

if (associated_impl_block != nullptr && !reciever_is_dyn)
if (associated_impl_block != nullptr && !receiver_is_dyn)
{
// associated types
HirId impl_block_id
Expand Down Expand Up @@ -492,7 +492,7 @@ TypeCheckExpr::resolve_segments (NodeId root_resolved_node_id,
if (tyseg->get_kind () == TyTy::TypeKind::ERROR)
return;
}
else if (tyseg->needs_generic_substitutions () && !reciever_is_generic)
else if (tyseg->needs_generic_substitutions () && !receiver_is_generic)
{
location_t locus = seg.get_locus ();
tyseg = SubstMapper::InferSubst (tyseg, locus);
Expand Down
Loading