r/rustjerk • u/Schaex • Oct 24 '26
This is fun
use ;
use slice;
Output:
[]
[1]
[1, 1]
[1, 1, 1, 1]
[1, 1, 1, 1, 1, 1, 1, 1]
[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
When do I get my Rust software developer job?
117
Upvotes
26
u/--San-- Oct 25 '26
Line 16 is UB, you can't create references to uninitialized data.
61
u/steaming_quettle Oct 24 '26
You're getting a C job actually
24
u/The-Dark-Legion ®ü$t Føūñdåtīón Oct 25 '26
This hurts me because it should be passing in Miri.
6
u/afrolino02 Oct 25 '26
Can i get the font name?
5
u/RoseboysHotAsf Oct 26 '26
Im a c++ programmer and see nothing wrong with this code
2
u/Snudget Oct 26 '26
No, you first have to use a bug in the compiler to turn this into blazingly fast memory safe segfault