Eprogrammerhumor·Programmer HumorbyEphera After a day of coding Rust...View original on lemmy.ml187Comments7
sstingpie lemmy.world2Hide 2 repliesRust isn't real. Its just a bit much of abbreviated gibberish created by religious fanatics worshipping safe programming practices and reasonable error handling!12
EEphera replylemmy.ml1Hide 1 replyPretty sure, it's not. That's why I included the error highlighting. To make it a valid struct field, you'd need to throw in a Box+dyn: pub pint: Box For a function parameter, you need an impl and can't have the pub: pint: impl Sized Obviously, you could define your own struct or generic that also happens to be called Sized, but yeah, that's cheating.4
Rust isn't real. Its just a bit much of abbreviated gibberish created by religious fanatics worshipping safe programming practices and reasonable error handling!
You're going to borrow-checker hell now
Wait until you learn about Lisp
ngl, this meme tickled me
is that valid syntax in any context? i dont think it is
Pretty sure, it's not. That's why I included the error highlighting.
To make it a valid struct field, you'd need to throw in a Box+dyn:
For a function parameter, you need an
impland can't have thepub:Obviously, you could define your own struct or generic that also happens to be called
Sized, but yeah, that's cheating.thats what i figured. thanks :-)