aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorPhilip Herron <philip.herron@embecosm.com>2022-04-08 15:16:28 +0100
committerPhilip Herron <philip.herron@embecosm.com>2022-04-09 21:56:46 +0100
commit8d3184e822af007829b3820a9b3df03b7548ff59 (patch)
tree46a49bd1c7b70dfca5b9b3022b6b0197b70cc750 /gcc
parente43a5c5373b341d217d2f5403f31f5174b8c4e2f (diff)
downloadgcc-8d3184e822af007829b3820a9b3df03b7548ff59.zip
gcc-8d3184e822af007829b3820a9b3df03b7548ff59.tar.gz
gcc-8d3184e822af007829b3820a9b3df03b7548ff59.tar.bz2
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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/rust/typecheck/rust-autoderef.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/rust/typecheck/rust-autoderef.cc b/gcc/rust/typecheck/rust-autoderef.cc
index 67c1908..986ff46 100644
--- a/gcc/rust/typecheck/rust-autoderef.cc
+++ b/gcc/rust/typecheck/rust-autoderef.cc
@@ -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