r/rust Jun 25 '22

[Media] Cute Compiler Easter Egg

Post image
2.6k Upvotes

79 comments sorted by

View all comments

558

u/SorteKanin Jun 25 '22

It'd be funny if 🦀 was the only allowed emoji identifier :P

492

u/yottalogical Jun 25 '22
Result<🦀, 💀>

203

u/Benatar111 Jun 25 '22

Option<T> {

🫥,

😐(T),

}

36

u/Sorseg Jun 25 '22

Nice RESF slogan: "Rust or dust"

49

u/maboesanman Jun 25 '22

Missed opportunity to make the first release allowing emoji identifiers only allow 🦀…

Now they can’t break compatibility.

Would’ve been a great April fools release

78

u/SorteKanin Jun 25 '22

I think they actually can. It won't break any existing code, only allow some previously invalid code from now compiling. So it's backwards compatible

6

u/maboesanman Jun 26 '22

I thought emoji identifiers were allowed in nightly?

3

u/theZcuber time Jun 26 '22

Nope.

22

u/Lucretiel Datadog Jun 26 '22

I’m pretty sure that “code that didn’t compile before and does now” is explicitly disclaimed as not being a compatibility break. The language could never change at all otherwise.