-
Notifications
You must be signed in to change notification settings - Fork 209
Open
Labels
Description
auto-reduced (treereduce-rust):
//@compile-flags: -frust-incomplete-and-experimental-compiler-do-not-use
struct Expr<const N: u32>;
trait Trait0 {
fn required(
_: Expr<
{
struct Type;
0
},
>,
);
}original:
// Regression test for issue #89342 and for part of #119924.
//@ check-pass
struct Expr<const N: u32>;
trait Trait0 {
fn required(_: Expr<{
struct Type;
impl Type {
// This visibility qualifier used to get rejected.
pub fn perform() {}
}
0
}>);
}
trait Trait1 {}
impl Trait1 for ()
where
[(); {
struct Type;
impl Type {
// This visibility qualifier used to get rejected.
pub const STORE: Self = Self;
}
0
}]:
{}
fn main() {}Version information:
Possibly related line of code:
gccrs/gcc/rust/resolve/rust-name-resolution-context.h
Lines 364 to 376 in c742973
| return get_record (id).as_path (*nr_ctx); | |
| } | |
| CanonicalPathRecord &get_record (NodeId id) const | |
| { | |
| auto it = records.find (id); | |
| rust_assert (it != records.end ()); | |
| return *it->second; | |
| } | |
| tl::optional<CanonicalPathRecord *> get_record_opt (NodeId id) const | |
| { | |
| auto it = records.find (id); |
Command:
/home/matthias/vcs/github/gccrs/gccrs-build/gcc/crab1 -frust-incomplete-and-experimental-compiler-do-not-use
Program output
crab1: internal compiler error: in get_record, at rust/resolve/rust-name-resolution-context.h:370
0x300c7d8 internal_error(char const*, ...)
../../gcc/diagnostic-global-context.cc:534
0xc23693 fancy_abort(char const*, int, char const*)
../../gcc/diagnostics/context.cc:1640
0x90dc6f Rust::Resolver2_0::CanonicalPathCtx::get_record(unsigned int) const
../../gcc/rust/resolve/rust-name-resolution-context.h:370
0x90dc6f Rust::Resolver2_0::CanonicalPathCtx::get_path(unsigned int) const
../../gcc/rust/resolve/rust-name-resolution-context.h:364
0x90dc6f Rust::Resolver2_0::NameResolutionContext::to_canonical_path(unsigned int) const
../../gcc/rust/resolve/rust-name-resolution-context.h:549
0x90dc6f Rust::Resolver::TypeCheckItem::visit(Rust::HIR::StructStruct&)
../../gcc/rust/typecheck/rust-hir-type-check-item.cc:271
0x103f585 Rust::Resolver::TypeCheckItem::Resolve(Rust::HIR::Item&)
../../gcc/rust/typecheck/rust-hir-type-check-item.cc:57
0x107a72b ???
../../gcc/rust/typecheck/rust-hir-type-check-stmt.h:40
0x107ad43 Rust::Resolver::TypeCheckStmt::Resolve(Rust::HIR::Stmt&)
../../gcc/rust/typecheck/rust-hir-type-check-stmt.cc:34
0x106c504 Rust::Resolver::TypeCheckExpr::visit(Rust::HIR::BlockExpr&)
../../gcc/rust/typecheck/rust-hir-type-check-expr.cc:614
0x106ab44 Rust::Resolver::TypeCheckExpr::Resolve(Rust::HIR::Expr&)
../../gcc/rust/typecheck/rust-hir-type-check-expr.cc:50
0x1013316 Rust::TyTy::SubstitutionRef::get_mappings_from_generic_args(Rust::HIR::GenericArgs&, std::vector<Rust::TyTy::Region, std::allocator<Rust::TyTy::Region> > const&)
../../gcc/rust/typecheck/rust-tyty-subst.cc:788
0x10fe873 Rust::Resolver::SubstMapper::visit(Rust::TyTy::ADTType&)
../../gcc/rust/typecheck/rust-substitution-mapper.cc:112
0x10fdd27 Rust::Resolver::SubstMapper::Resolve(Rust::TyTy::BaseType*, unsigned long, Rust::HIR::GenericArgs*, std::vector<Rust::TyTy::Region, std::allocator<Rust::TyTy::Region> > const&)
../../gcc/rust/typecheck/rust-substitution-mapper.cc:47
0x10541ab Rust::Resolver::TypeCheckType::resolve_root_path(Rust::HIR::TypePath&, unsigned long*, bool*)
../../gcc/rust/typecheck/rust-hir-type-check-type.cc:461
0x1055cdf Rust::Resolver::TypeCheckType::visit(Rust::HIR::TypePath&)
../../gcc/rust/typecheck/rust-hir-type-check-type.cc:147
0x1052887 Rust::Resolver::TypeCheckType::Resolve(Rust::HIR::Type&)
../../gcc/rust/typecheck/rust-hir-type-check-type.cc:71
0x10538c7 Rust::Resolver::TypeCheckType::Resolve(Rust::HIR::Type&)
../../gcc/rust/typecheck/rust-hir-type-check-type.cc:67
0xfdfb0c Rust::Resolver::TraitItemReference::get_type_from_fn(Rust::HIR::TraitItemFunc&) const
../../gcc/rust/typecheck/rust-hir-type-check.cc:269
0x10351d2 Rust::Resolver::TraitItemReference::resolve_item(Rust::HIR::TraitItemFunc&)
../../gcc/rust/typecheck/rust-hir-trait-resolve.cc:400
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.
Reactions are currently unavailable