Open
Description
auto-reduced (treereduce-rust):
//@compile-flags: -frust-incomplete-and-experimental-compiler-do-not-use -frust-name-resolution-2.0
pub struct GenericType;
impl Output for GenericType<{ 42 }> {
type Output = ();
}
original:
#![cfg_attr(full, allow(incomplete_features))]
#![cfg_attr(full, allow(incomplete_features))]
#![cfg_attr(min, feature(min_const_generics))]
// All of these three items must be in `lib2` to reproduce the error
pub trait TypeFn {
type Output;
}
pub struct GenericType<const B: i8>;
// Removing the braces around `42` resolves the crash
impl Output for GenericType<{ 42 }> {
type Output = ();
}
Version information:
Possibly related line of code:
gccrs/gcc/rust/typecheck/rust-hir-trait-resolve.cc
Lines 154 to 166 in 7651217
Command:
/home/matthias/vcs/github/gccrs/gccrs-build/gcc/crab1 -frust-incomplete-and-experimental-compiler-do-not-use -frust-name-resolution-2.0
Program output
crab1: internal compiler error: in resolve_path_to_trait, at rust/typecheck/rust-hir-trait-resolve.cc:160
0x890685 Rust::Resolver::TraitResolver::resolve_path_to_trait(Rust::HIR::TypePath const&, Rust::HIR::Trait**) const
../../gcc/rust/typecheck/rust-hir-trait-resolve.cc:160
0xf74654 Rust::Resolver::TraitResolver::resolve_path(Rust::HIR::TypePath&)
../../gcc/rust/typecheck/rust-hir-trait-resolve.cc:178
0xf74654 Rust::Resolver::TraitResolver::Resolve(Rust::HIR::TypePath&)
../../gcc/rust/typecheck/rust-hir-trait-resolve.cc:93
0xf82738 Rust::Resolver::TypeCheckItem::visit(Rust::HIR::ImplBlock&)
../../gcc/rust/typecheck/rust-hir-type-check-item.cc:506
0xf7dbb7 Rust::Resolver::TypeCheckItem::Resolve(Rust::HIR::Item&)
../../gcc/rust/typecheck/rust-hir-type-check-item.cc:59
0xf1518b Rust::Resolver::TypeResolution::Resolve(Rust::HIR::Crate&)
../../gcc/rust/typecheck/rust-hir-type-check.cc:75
0xce8f73 Rust::Session::compile_crate(char const*)
../../gcc/rust/rust-session-manager.cc:685
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.