Joshua Liebow-Feeser

Results 299 comments of Joshua Liebow-Feeser

Yep: ```rust extern crate rand; struct UnstableSlice([T]); impl Deref for UnstableSlice { type Target = [T]; fn deref(&self) -> &[T] { let len = self.0.len(); &self.0[..rand::random() % len] } }...

I don't have an example. The code I was hoping to use `StableDeref` for uses `unsafe` under the hood, and provides a safe API. So even if such code is...

Yeah, I've toyed with this idea a lot. The justification for having them be panics is that it's an error that happens when the program is incorrect, not one that...

Hmmm... So I've never actually used gopack for anything, so maybe I don't have the best intuition about it. Is the code you're writing available so I can take a...

Hahah yeah, I just got the idea one Friday afternoon and powered through the implementation in a weekend; it wasn't out of necessity. Other than a few improvements I made...

@ehuss > Can you clarify more details on what is currently missing? In the original issue, I had code like the following: ```rust fn do_thing(res: &mut Result) { match res...

@bjorn3 > It is not sound. `x` is a reference that is only valid for a field, but you overwrite the discriminant too. Yes, but we don't use the reference...

> However, overwriting with `ptr::write` doesn't cause any drop glue to be called, so I fail to see how your code even has anything to do with drop glue, @joshlf....

Ah, understood. I guess I've been using "effect" and "observable" as interchangeable.