Skip to content

Commit

Permalink
Ensure unsize method resolutions actually unsize
Browse files Browse the repository at this point in the history
This was a typo when unsized method resolution was added, where the
adjustment was wrongly marked as an indirection. The enum is required so
that the code generation adjustment takes place.

Addresses #849
  • Loading branch information
philberty committed Apr 9, 2022
1 parent e43a5c5 commit 76217d4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gcc/rust/typecheck/rust-autoderef.cc
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ Adjuster::try_unsize_type (const TyTy::BaseType *ty)
TyTy::TyVar (slice_elem->get_ref ()));
context->insert_implicit_type (slice);

return Adjustment (Adjustment::AdjustmentType::INDIRECTION, slice);
return Adjustment (Adjustment::AdjustmentType::UNSIZE, slice);
}

static bool
Expand Down

0 comments on commit 76217d4

Please sign in to comment.