We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
impl Trait
[E0720]
E0720
godbolt
#![allow(unused)] fn main() { fn make_recursive_type() -> impl Sized { [make_recursive_type(), make_recursive_type()] } }
➜ 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.
The text was updated successfully, but these errors were encountered:
fn make_recursive_type() -> impl Sized {} fn main() {}
This triggers the same ICE. It looks like impl Trait doesn't work in function return position yet.
Sorry, something went wrong.
philberty
No branches or pull requests
impl Trait
type expands to a recursive typeE0720
godbolt
Code
Meta
Error output
The text was updated successfully, but these errors were encountered: