You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When we encounter a "break rust" statement, emit a funny error message
and intentionally cause an ICE. This matches the corresponding Easter
egg in rustc. As a GNU extension, "break gcc" is also supported.
The conditions for this to happen are:
* The break expression must be literally "rust" or "gcc". For instance,
"break (rust)" will not trigger the Easter egg.
* The name ("rust" or "gcc") must not be in scope; if it is, no error
is emitted, and the compilation proceeds as usual. In other words,
this only affects how GCC diagnoses programs that would fail to
compile anyway.
Closes#1996
gcc/rust/ChangeLog:
* resolve/rust-ast-resolve-expr.cc: Add "break rust" Easter egg
gcc/testsuite/ChangeLog:
* gcc/testsuite/lib/prune.exp (prune_ices):
Also prune "You broke GCC Rust. This is a feature."
* rust/compile/break-rust1.rs: New test
* rust/compile/break-rust2.rs: New test
* rust/compile/break-rust3.rs: New test
Signed-off-by: Sergey Bugaev <[email protected]>
0 commit comments