]> git.ipfire.org Git - thirdparty/gcc.git/commit
gccrs: lower: Correctly lower parenthesized types
authorArthur Cohen <arthur.cohen@embecosm.com>
Wed, 25 Dec 2024 17:55:09 +0000 (17:55 +0000)
committerArthur Cohen <arthur.cohen@embecosm.com>
Fri, 21 Mar 2025 11:55:44 +0000 (12:55 +0100)
commitcd8547f85e53b42eff5a7c7572b466c023c75daf
treec6b8d50192318dca24f4574f0505e461389258fd
parentc8721ccdeb45396c5acf53da058a0fe1e3d03590
gccrs: lower: Correctly lower parenthesized types

This is useful for handling multiple trait bounds, and required for better handling of auto traits.

gcc/rust/ChangeLog:

* hir/rust-ast-lower-type.cc (ASTLoweringType::visit): Add implementation for
ParenthesizedType.
* hir/rust-ast-lower-type.h: Declare that new visitor.

gcc/testsuite/ChangeLog:

* rust/compile/auto_traits1.rs: New test.
gcc/rust/hir/rust-ast-lower-type.cc
gcc/rust/hir/rust-ast-lower-type.h
gcc/testsuite/rust/compile/auto_traits1.rs [new file with mode: 0644]