# Idea: make assert!() a keyword - REJECTED

**URL:** <https://internals.rust-lang.org/t/idea-make-assert-a-keyword-rejected/13066>\
**Category:** language design\
**Created:** [September 15, 2020, 2:21pm UTC](https://internals.rust-lang.org/t/idea-make-assert-a-keyword-rejected/13066 "2020-09-15T14:21:12Z")\
**Posts on this page:** 1\
**Showing post:** 85

<div class="post-metadata">

**Author:** ![scottmcm](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/scottmcm/32/2355_2.png) [@scottmcm](https://internals.rust-lang.org/u/scottmcm)\
**Post date:** [October 2, 2020, 8:40pm UTC](https://internals.rust-lang.org/t/idea-make-assert-a-keyword-rejected/13066/85 "2020-10-02T20:40:30Z")

</div>

> [@ckaran](#):
>
> But this introduces friction; you need to know what the macro will evaluate to, and whether or not that will be appropriate at that position. I want to get rid of that issue entirely.

\<lang-hat\>Not speaking for the team here, but the bar for a new keyword is generally extremely high, even one that looks like a macro. I suspect that "there are two macros (or two macro forms)" here would be considered a better solution than adding a keyword\</lang-hat\>

> [@ckaran](#):
>
> place the constraint test in a block that dominates all other executable code

Note that Rust generally tries to avoid _life before main_, so I suspect "a new block that is at the start of `main()`" wouldn't happen. (Among other reasons, because what would that mean for something compiled as a library and might be used somewhere without a Rust `main`.)

That said, if we had something like [Idea: global static variables extendable at compile-time](https://internals.rust-lang.org/t/idea-global-static-variables-extendable-at-compile-time/9879) (which [has a chance](https://rust-lang.zulipchat.com/#narrow/stream/213817-t-lang/topic/global.20hooks.20and.20their.20relation.20to.20traits.20and.20vtables/near/211786296), if someone's interested in driving it) could do the "extensible collection of bits of code" that could be called manually from entry-points. Which I agree would be a nice use of this, and mean that the assertion macros here would just be macros.

---

_[View the full topic](https://internals.rust-lang.org/t/idea-make-assert-a-keyword-rejected/13066)._
