r/rustjerk • recycle! (|_| ())(x) • Jun 25 '22

When rustc developers run out of error messages to write

Post image
1.5k Upvotes

21 comments sorted by

77

u/thedominux Jun 25 '22

Looool, is there really this error?

136

u/corrodedfe recycle! (|_| ())(x) Jun 25 '22

Nah it's fake. Maybe one day, though...

67

u/Sw429 Jun 25 '22

Open a PR. Be the change you want to see.

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 NoBold underlined my text and NoFaint undid the Bold. If it looks strange try replacing NoFaint with NoBold)

If you have the will to, go find how rustc does 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

u/Da-Blue-Guy trait Gender: Any Dec 24 '22

I'll try to get on it

5

u/LoganDark Jun 29 '22 edited Jun 29 '22

better solution is tart

edit: example

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

u/WesolyKubeczek Jun 25 '22

/uj good ol’ echo in a terminal can do wonders

1

u/[deleted] Apr 09 '25

The colors...

170

u/axord Jun 25 '22

error: it seems a cat walked over your keyboard.

59

u/kennethuil Jun 25 '22

help: try giving your cat his own keyboard to sleep on

14

u/[deleted] Jun 25 '22

Then you can have a spare for when the cat sleeps on your keyboard!

6

u/MinRaws Jun 30 '22

warning: your dog might feel lonely, so give him one too.

37

u/ondono Jun 25 '22

Error: it seems you’re drunk.

Hint: friends don’t let friends drink and code.

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

u/[deleted] Aug 21 '22

rustc is an AI confirmed

0

u/[deleted] Jun 25 '22

It’s morbin time