diff options
author | Philip Herron <herron.philip@googlemail.com> | 2023-05-30 17:16:30 +0100 |
---|---|---|
committer | Philip Herron <philip.herron@embecosm.com> | 2023-05-30 17:03:48 +0000 |
commit | fb1259001c2554bfc622bd31c9e07f05a7f2588b (patch) | |
tree | 8194e19ad021d479c6a706383402d6dccd3f7db3 /gcc/gimple-range-edge.cc | |
parent | bc2cac14138c5276562e8df83c01646e99a117ff (diff) | |
download | gcc-fb1259001c2554bfc622bd31c9e07f05a7f2588b.zip gcc-fb1259001c2554bfc622bd31c9e07f05a7f2588b.tar.gz gcc-fb1259001c2554bfc622bd31c9e07f05a7f2588b.tar.bz2 |
gccrs: Fix cast site to not miss type-unifications
When attempting casts we can try a type coercion first, this is a
TryCoercion which will return a result. In the event this is ok we need to
perform a true coercion so that we don't leave missing infeence variable's
ununified.
Fixes #2195
gcc/rust/ChangeLog:
* typecheck/rust-casts.cc (TypeCastRules::check): do coercion
(TypeCastRules::emit_cast_error): clang-format
gcc/testsuite/ChangeLog:
* rust/compile/issue-2195.rs: New test.
Signed-off-by: Philip Herron <herron.philip@googlemail.com>
Diffstat (limited to 'gcc/gimple-range-edge.cc')
0 files changed, 0 insertions, 0 deletions