r/rustjerk • u/corrodedfe recycle! (|_| ())(x) • Jun 25 '22
When rustc developers run out of error messages to write
26
u/nonbinarydm Jun 25 '22
how did you make this? asking for a friend who wants to make more rustc memes
50
u/corrodedfe recycle! (|_| ())(x) Jun 25 '22
Termion crate (https://crates.io/crates/termion), and very careful observation of a rust error. Hope your friend finds it useful ;)
use termion::{color::*, style::{Bold, NoFaint}}; fn main() { println!(); println!(" {}{}error{}: it seems like you've fallen asleep and hit your keyboard{}", Red.fg_str(), Bold, Reset.fg_str(), NoFaint); println!(" {}-->{} src/main.rs:20:22", Blue.fg_str(), Reset.fg_str()); println!(" {}|", Blue.fg_str()); println!(" 20 |{} self.prehopjpokppppppppppppppp", Reset.fg_str()); println!(" {}| {}{}^^^^^^^^^^^^^^^^^^^^^^ you fell asleep here", Blue.fg_str(), Red.fg_str(), Bold); println!(" {}|", Blue.fg_str()); println!(" {}= {}{}help{}: try improving your sleep schedule or reducing your hours", Blue.fg_str(), Reset.fg_str(), Bold, NoFaint); println!(); }(I noticed that
NoBoldunderlined my text andNoFaintundid theBold. If it looks strange try replacingNoFaintwithNoBold)If you have the will to, go find how
rustcdoes errors. Iirc it's just some struct that you could probably quite easily extract. Maybe someone has already done that, I just couldn't be bothered to check.14
u/Philpax Jun 25 '22
you could probably make an application (even better if it's on the web!) to do this, so that we can really get our rustjerk on
2
5
1
u/ItsAlreadyTaken69 Jul 03 '22
You could use the codespan-reporting crate maybe (or one of it's alternatives) since they're kind of made for that (errors)
15
83
u/The-Best-Taylor Jun 25 '22
This seems related to the cat on keyboard bug https://bugs.launchpad.net/ubuntu/+source/unity/+bug/1463112
170
u/axord Jun 25 '22
error: it seems a cat walked over your keyboard.
59
37
20
u/WesolyKubeczek Jun 25 '22
Here’s one to all the brave souls who have fallen asleep at their keyboards fighting the borrow checker and sgegrghsgehrhdheggehdhrrrjjtjtj
1
0
77
u/thedominux Jun 25 '22
Looool, is there really this error?