Skip to content

Commit 8d3184e

Browse files
committed
Ensure unsize method resolutions actually unsize
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
1 parent e43a5c5 commit 8d3184e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gcc/rust/typecheck/rust-autoderef.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ Adjuster::try_unsize_type (const TyTy::BaseType *ty)
116116
TyTy::TyVar (slice_elem->get_ref ()));
117117
context->insert_implicit_type (slice);
118118

119-
return Adjustment (Adjustment::AdjustmentType::INDIRECTION, slice);
119+
return Adjustment (Adjustment::AdjustmentType::UNSIZE, slice);
120120
}
121121

122122
static bool

0 commit comments

Comments
 (0)