Skip to content

Add assert macro handler#4513

Merged
P-E-P merged 1 commit into
Rust-GCC:masterfrom
P-E-P:fix_parser_bug_null_denotation_macro
Apr 28, 2026
Merged

Add assert macro handler#4513
P-E-P merged 1 commit into
Rust-GCC:masterfrom
P-E-P:fix_parser_bug_null_denotation_macro

Conversation

@P-E-P

@P-E-P P-E-P commented Apr 3, 2026

Copy link
Copy Markdown
Member

Assert macro handler was missing, insert a basic handler that desugars to a condition and a call to panic.

@P-E-P P-E-P marked this pull request as draft April 3, 2026 14:59
@P-E-P P-E-P force-pushed the fix_parser_bug_null_denotation_macro branch 2 times, most recently from aec63b4 to 5a3a686 Compare April 13, 2026 14:38
@P-E-P P-E-P marked this pull request as ready for review April 13, 2026 14:38
@P-E-P P-E-P force-pushed the fix_parser_bug_null_denotation_macro branch from 5a3a686 to 11e52fb Compare April 13, 2026 15:05
@P-E-P P-E-P requested a review from CohenArthur April 13, 2026 16:18
@P-E-P P-E-P force-pushed the fix_parser_bug_null_denotation_macro branch from 11e52fb to 436fe22 Compare April 13, 2026 17:15

@CohenArthur CohenArthur left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM :)

Comment thread gcc/rust/expand/rust-macro-builtins-log-debug.cc Outdated
@P-E-P P-E-P force-pushed the fix_parser_bug_null_denotation_macro branch 2 times, most recently from 737236f to a36f4b1 Compare April 28, 2026 12:52
Assert macro handler was missing, insert a basic handler that desugars to
a condition and a call to panic.

gcc/rust/ChangeLog:

	* expand/rust-macro-builtins-log-debug.cc (MacroBuiltin::assert_handler):
	Add basic assert builtin macro handler.

gcc/testsuite/ChangeLog:

	* rust/compile/assert_missing_panic.rs: New test.

Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
@P-E-P P-E-P force-pushed the fix_parser_bug_null_denotation_macro branch from a36f4b1 to 4277c84 Compare April 28, 2026 12:53
@P-E-P P-E-P enabled auto-merge April 28, 2026 12:56
@P-E-P P-E-P added this pull request to the merge queue Apr 28, 2026
Merged via the queue into Rust-GCC:master with commit afb19b7 Apr 28, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants