gccrs icon indicating copy to clipboard operation
gccrs copied to clipboard

ICE - when `impl Trait` type expands to a recursive type `[E0720]`

Open MahadMuhammad opened this issue 11 months ago • 1 comments

impl Trait type expands to a recursive type E0720

Code

#![allow(unused)]
fn main() {
fn make_recursive_type() -> impl Sized {
    [make_recursive_type(), make_recursive_type()]
}
}

Meta

  • What version of Rust GCC were you using, git sha https://github.com/Rust-GCC/gccrs/commit/f7d937321b2426eba5dd5fd0d288967324256f04
  • gccrs (Compiler-Explorer-Build-gcc-f7d937321b2426eba5dd5fd0d288967324256f04-binutils-2.40) 13.0.1 20230417 (experimental)

Error output

  • Internal Compiler Error.
 ➜  gccrs-build gcc/crab1 ../mahad-testsuite/E0720.rs                                               
crab1: internal compiler error: in translate, at rust/hir/rust-ast-lower-type.cc:188
0x7c2307 Rust::HIR::ASTLoweringType::translate(Rust::AST::Type*)
	../../gccrs/gcc/rust/hir/rust-ast-lower-type.cc:188
0xbe05df Rust::HIR::ASTLoweringItem::visit(Rust::AST::Function&)
	../../gccrs/gcc/rust/hir/rust-ast-lower-item.cc:420
0xbdb2c0 Rust::HIR::ASTLoweringItem::translate(Rust::AST::Item*)
	../../gccrs/gcc/rust/hir/rust-ast-lower-item.cc:37
0xbf6e2f Rust::HIR::ASTLoweringStmt::visit(Rust::AST::ConstantItem&)
	../../gccrs/gcc/rust/hir/rust-ast-lower-stmt.cc:64
0xbf71cf Rust::HIR::ASTLoweringStmt::translate(Rust::AST::Stmt*, bool*)
	../../gccrs/gcc/rust/hir/rust-ast-lower-stmt.cc:32
0xbd0aa4 Rust::HIR::ASTLoweringBlock::visit(Rust::AST::BlockExpr&)
	../../gccrs/gcc/rust/hir/rust-ast-lower.cc:114
0xbe0770 Rust::HIR::ASTLoweringBlock::translate(Rust::AST::BlockExpr*, bool*)
	../../gccrs/gcc/rust/hir/rust-ast-lower-block.h:37
0xbe0770 Rust::HIR::ASTLoweringItem::visit(Rust::AST::Function&)
	../../gccrs/gcc/rust/hir/rust-ast-lower-item.cc:445
0xbdb2c0 Rust::HIR::ASTLoweringItem::translate(Rust::AST::Item*)
	../../gccrs/gcc/rust/hir/rust-ast-lower-item.cc:37
0xbd06b8 Rust::HIR::ASTLowering::go()
	../../gccrs/gcc/rust/hir/rust-ast-lower.cc:79
0xbd09b8 Rust::HIR::ASTLowering::Resolve(Rust::AST::Crate&)
	../../gccrs/gcc/rust/hir/rust-ast-lower.cc:69
0xabf6c8 Rust::Session::compile_crate(char const*)
	../../gccrs/gcc/rust/rust-session-manager.cc:624
Please submit a full bug report, with preprocessed source (by using -freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

MahadMuhammad avatar Aug 04 '23 10:08 MahadMuhammad