Skip to content

Commit 6f1f7c7

Browse files
committed
gccrs: return error node when this fails during constexpr case
Not adding the test case here we emit more errors than rustc for the error type node so its just noisy and dejagnu is being a pain. Fixes #3933 gcc/rust/ChangeLog: * backend/rust-compile-resolve-path.cc (ResolvePathRef::resolve): return error_mark_node Signed-off-by: Philip Herron <[email protected]>
1 parent bc5f02f commit 6f1f7c7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

gcc/rust/backend/rust-compile-resolve-path.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,8 @@ ResolvePathRef::resolve (const HIR::PathIdentSegment &final_segment,
214214
{
215215
TyTy::BaseType *lookup = nullptr;
216216
bool ok = ctx->get_tyctx ()->lookup_type (mappings.get_hirid (), &lookup);
217-
rust_assert (ok);
217+
if (!ok)
218+
return error_mark_node;
218219

219220
// need to look up the reference for this identifier
220221

0 commit comments

Comments
 (0)