]>
git.ipfire.org Git - thirdparty/gcc.git/commit
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>