It's better to do:
unsafe fn extend_lifetime<'a, 'b>(r: R<'a>) -> R<'b>
Because it works better with generics (and you can always return to the above signature by specifying 'b == 'static
.
It's better to do:
unsafe fn extend_lifetime<'a, 'b>(r: R<'a>) -> R<'b>
Because it works better with generics (and you can always return to the above signature by specifying 'b == 'static
.
No need to discuss the API, this quote is all about the unholy diacritics on the identifier.
I needed to double check but apparently, this identifier is actually literally valid.
Well, it gives a warning at least
warning: identifier contains uncommon Unicode codepoints
Linux Fortune: (full text)
What they say: What they mean:
Meets Tough Quality Standards It compiles without errors.
Ok this was not about Rust. It was a joke about languages like C. But with Rust, it's true!
Shameless self-nomination:
When a panic has a payload that's an object which needs
Drop
s,
And the panic hits acatch_unwind
for unexpected stops
Before if itsDrop
panicked we'd just crash to your desktops,
Now the payload gets forgotten, and you'd better grab some mops!
-- https://twitter.com/josh_triplett/status/1407776002973986819
Seems worthy enough of a self-nomination.
Beginning Rust: Uh why does the compiler stop me from doing things this is horrible
Advanced Rust: Ugh why doesn't the compiler stop me from doing things this is horrible
The nasty thing about UB is that it does not guarantee that things will go horribly wrong. UB likes to lure you into thinking that you are fine... until it suddenly pulls the floor out from underneath of you and you plummet into the pit where all your code has been arranged in a nice set of spikes.
Just replace the "Advanced Rust" with "Beginner C" (or "Advanced C", for that matter) and this will be perfect
Lol I came here because I considered self-nominating, but you people are too quick and exceedingly well informed.
First of all, it seems like
Pin
might actually beUnpin
. This might sound surprising, but really whatUnpin
means is that the "pinned" and "not-pinned" typestates of a type are the same
-- ralfj
Source: https://github.com/rust-lang/rust/pull/81363#discussion_r650561252
If I can get around ownership issues by cloning first I will absolutely do it, because I see removing clones as an optimization step. […] go and actually measure your performance to see if you actually need to remove the clones. Sometimes you don’t and sometimes you do.
-- Jonathan "JT" Turner in a Rust stream
Tip: whenever you wonder if
Pin
could be the solution, it isn't
One of the hardest parts of design is the way it interacts with everything. A good abstraction can sometimes cut through that tangled mess and make some parts orthogonal.
"Four years had passed since then and the future was now; two years have passed since the future was now and the future is now past."
-- bstrie in Scoped threads in the standard library, take 2 by bstrie · Pull Request #3151 · rust-lang/rfcs · GitHub
We were able to verify the safety of Rust's type system and thus show how Rust automatically and reliably prevents entire classes of programming errors
Ralf Jung in Computer Scientist proves safety claims of th | EurekAlert!