Niko Matsakis
Niko Matsakis
@Ericson2314 > I think this methodology overly embraces the "destructors may not be run approach" we adopted after the Rc issue. I'm a bit confused. Are you advocating that we...
So I think this is sort of a "not entirely obvious" question. However, what pushed me in favor of my current proposal was a few things: Introducing false unwind edges...
~~Ah, one other thing: if we *don't* have a universal exit from the control-flow graph, then it is also true that we need to do some work to make liveness...
@RalfJung > This of course is all irrelevant when panics abort, but do we really want borrowck behavior to depend on panic=abort vs. unwind? Indeed, I do not. > Surprising...
@Ericson2314 > Adding fake edges to enforce an invariant of always having is not conservative. We can't stop adding those edges if we rely on that invariant. Hmm, maybe we're...
@Ericson2314 in that example (or one very much like it), wouldn't it be possible for the destructor of `Foo` to store the `&'static` reference in some global somewhere?
@Ericson2314 so -- in that case -- how is this code safe? ```rust unsafe { let x = ...; let y: Foo
@RalfJung > Which guarantee is it that they would no longer be getting? If you do this (today): ```rust { let x = Guard(&mut y); // where Guard has a...
@Ericson2314 So you quoted @japaric here: > I have mentioned before that stuff allocated in never-ending functions (`fn() -> !`) should have a different lifetime to indicate that they can't...
@Ericson2314 > Here's a revised example Sorry, maybe I'm just too distracted, but can you now add a few notes with just what you were attempting to demonstrate with this...