aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/backend/rust-compile-expr.cc
diff options
context:
space:
mode:
authorPhilip Herron <herron.philip@googlemail.com>2023-03-13 16:49:36 +0000
committerArthur Cohen <arthur.cohen@embecosm.com>2024-01-16 18:21:11 +0100
commit026c1041dff50ba5287deed0e8ad64bb787a4bdc (patch)
tree3fac84532588d42e954c2b4db19c8cd309cfce3a /gcc/rust/backend/rust-compile-expr.cc
parent0fdd53beb188bdaa30dc07de9a247e5a1e666767 (diff)
downloadgcc-026c1041dff50ba5287deed0e8ad64bb787a4bdc.zip
gcc-026c1041dff50ba5287deed0e8ad64bb787a4bdc.tar.gz
gcc-026c1041dff50ba5287deed0e8ad64bb787a4bdc.tar.bz2
gccrs: Remove solve_missing_mappings_from_this to handle covariants
change how we monomorphize dyn-items when we need to compute the generics We might have a trait item such as: impl<'a, T> FnLike<&'a T, &'a T> for Identity { fn call(&self, arg: &'a T) -> &'a T { ... } } Which ended up monomorphized badly to: const isize & const & <example::Identity as example::FnLike::<& T, & T>>::call<& isize> (const struct example::Identity & const self, const isize & const & const arg) This is wrong because it turned into a double reference type becasuse this bug was consistent bugs were not picked up but this is not correct. We now reuse our type inference infrastructure to solve the parameters instead. Fixes #1984 gcc/rust/ChangeLog: * backend/rust-compile.cc: use unify_and instead * typecheck/rust-tyty-subst.cc (SubstitutionRef::solve_missing_mappings_from_this): remove * typecheck/rust-tyty-subst.h: update header Signed-off-by: Philip Herron <herron.philip@googlemail.com>
Diffstat (limited to 'gcc/rust/backend/rust-compile-expr.cc')
0 files changed, 0 insertions, 0 deletions