Alan-Chen99
Alan-Chen99
Ah, I see. Cool idea! You have convinced me that `root!` is sound. I think this can be made even lighter: ```rust struct __StackRootLight { obj: T, // safe to...
Of course this would still be a macro; it will expand to something like ``` let __stackroot1 = __StackRootLight { root_set }; let rt1 = record_on_rootset(1, &__stackroot1, root_set); ``` and...
Is handlers for catching lisp exceptions? Anyways, this is unsound for a copying gc: ``` #[repr(transparent)] pub(crate) struct Rt { _aliasable: PhantomPinned, inner: T, } ``` PhantomPinned does not make...
> It actually does. It marks the type !Unpin which prevents noalias annotations Interesting, I was not aware of this. I would still say interior mutability is the "right" way...
> yes, it determines where to jump for a condition-case statement. I see. What motivates this instead of putting the error in the Result?
> They errors are in a Result, but [condition-case](https://www.gnu.org/software/emacs/manual/html_node/elisp/Handling-Errors.html) can have multiple handlers depending the error type, so we need to setup all of those. Ah I see, that makes...
btw `bind_as` is unsound, it lets you get a 'static
> With UnsafeCell you can have a &mut T alias with a &UnsafeCell, but not the other way around. You can't have &mut UnsafeCell alias with &T, which is what...
Ah, I think I understand the problem better now. Rust DO have an aliasable pointer: its called raw pointers (surprise!) it seems to me that `&mut` to an `!unpin` is...
Actually that might not work due to stacked borrows, will need to think more. One thing that will definitely work is to use !Unpin on leaves. This is still arguably...