public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc/devel/rust/master] Ensure unsize method resolutions actually unsize
@ 2022-06-08 12:26 Thomas Schwinge
  0 siblings, 0 replies; only message in thread
From: Thomas Schwinge @ 2022-06-08 12:26 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:8d3184e822af007829b3820a9b3df03b7548ff59

commit 8d3184e822af007829b3820a9b3df03b7548ff59
Author: Philip Herron <philip.herron@embecosm.com>
Date:   Fri Apr 8 15:16:28 2022 +0100

    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

Diff:
---
 gcc/rust/typecheck/rust-autoderef.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/rust/typecheck/rust-autoderef.cc b/gcc/rust/typecheck/rust-autoderef.cc
index 67c19084df9..986ff460490 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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-06-08 12:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-08 12:26 [gcc/devel/rust/master] Ensure unsize method resolutions actually unsize Thomas Schwinge

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).