diff options
author | Philip Herron <herron.philip@googlemail.com> | 2024-09-20 17:38:14 +0100 |
---|---|---|
committer | Arthur Cohen <arthur.cohen@embecosm.com> | 2025-03-19 15:32:15 +0100 |
commit | 566ae2082c0205f96986dd36f8f01705b7c731b7 (patch) | |
tree | d20f960659174100a44819840f818bf22b3de4a4 /gcc/rust/backend/rust-constexpr.h | |
parent | 9b4f8f2d5177b006c6996e790f3874c8b1eeacfa (diff) | |
download | gcc-566ae2082c0205f96986dd36f8f01705b7c731b7.zip gcc-566ae2082c0205f96986dd36f8f01705b7c731b7.tar.gz gcc-566ae2082c0205f96986dd36f8f01705b7c731b7.tar.bz2 |
rust: fix ICE during name resolution for impls on unit-types
The canonical paths need to support unit-types which are technically a
TupleType with no fields. This handles this case and adds an unreachable.
Fixes #3036
gcc/rust/ChangeLog:
* resolve/rust-ast-resolve-type.cc (ResolveTypeToCanonicalPath::visit): add unit-type catch
* resolve/rust-ast-resolve-type.h: likewise
gcc/testsuite/ChangeLog:
* rust/compile/nr2/exclude: nr2 cant handle this
* rust/compile/issue-3036.rs: New test.
Signed-off-by: Philip Herron <herron.philip@googlemail.com>
Diffstat (limited to 'gcc/rust/backend/rust-constexpr.h')
0 files changed, 0 insertions, 0 deletions