Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
leanrob35636y
-
I used to play with rust back in its nightly release, pre-beta days. Even then the compiler was a damn wizard. Haven't touched rust in a few years, so I imagine it's insane nowadays
-
Gnonpi7876yTrue dat, I started learning Rust on the side for few weeks, the compiler correct your code 90% of the time. It's amazing!
-
What kind of corrections do you find is most beneficial in rust?
I'm working on a thesis project that references rust a lot on how it visualise compiler messages and what it can correctify, so I'm most interested in what people find is most helpful.
(which I guess also means what do people always fail to code right in the first place... 😅) -
Except for
@highlight
trait Value {
const VAL: u32;
}
struct ArraySize;
impl Value for ArraySize {
const VAL: u32 = 42;
}
struct GenericArray<T, N: ArraySize> {
arr: [T; N::VAL], // associated item VAL not found, did you mean to impl Value for ArraySize?
}
// Yes I did that, thanks for asking. Almost like I DID IMPL IT
Related Rants
Sometime I’m developing in Rust and I do something wrong.
Then I look at the terminal and it says...
“You did X, did you mean to do Y”
Then I do it and it works perfectly, and I’m like...
Why do I even have a job if the compiler is this good?
rant
terminal
rust
compiler
joke