aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust
diff options
context:
space:
mode:
authorPhilip Herron <herron.philip@googlemail.com>2025-03-31 17:33:59 +0100
committerArthur Cohen <arthur.cohen@embecosm.com>2025-04-08 10:17:12 +0200
commit4f110b297d4e764df001099b1fb647dddf8ac278 (patch)
treeece048b6dee9ec95f297dac3b087755f4660ff7a /gcc/rust
parente873e2a0b15871fb0bcdb07155fc9a7407f66286 (diff)
downloadgcc-4f110b297d4e764df001099b1fb647dddf8ac278.zip
gcc-4f110b297d4e764df001099b1fb647dddf8ac278.tar.gz
gcc-4f110b297d4e764df001099b1fb647dddf8ac278.tar.bz2
gccrs: Fix ICE when resolving lifetimes without name
We dont need to assert here the lifetime code already supports this case. Fixes Rust-GCC#3657 gcc/rust/ChangeLog: * typecheck/rust-hir-type-check-base.cc: remove assertion gcc/testsuite/ChangeLog: * rust/compile/issue-3657.rs: New test. Signed-off-by: Philip Herron <herron.philip@googlemail.com>
Diffstat (limited to 'gcc/rust')
-rw-r--r--gcc/rust/typecheck/rust-hir-type-check-base.cc2
1 files changed, 0 insertions, 2 deletions
diff --git a/gcc/rust/typecheck/rust-hir-type-check-base.cc b/gcc/rust/typecheck/rust-hir-type-check-base.cc
index 34a726c..d3d6882 100644
--- a/gcc/rust/typecheck/rust-hir-type-check-base.cc
+++ b/gcc/rust/typecheck/rust-hir-type-check-base.cc
@@ -397,8 +397,6 @@ TypeCheckBase::resolve_generic_params (
auto lifetime_param
= static_cast<HIR::LifetimeParam &> (*generic_param);
auto lifetime = lifetime_param.get_lifetime ();
- rust_assert (lifetime.get_lifetime_type ()
- == AST::Lifetime::LifetimeType::NAMED);
context->get_lifetime_resolver ().insert_mapping (
context->intern_lifetime (lifetime));
}