Sure, that part makes sense. I guess since this doesn’t have any actual participation in the type system (unlike marker traits) I would have expected it to be a builtin attribute instead.
// Tell the borrow checker that multiple references can be made to the// same place at the same time:#[access_kind(Shared)]unsafeimpl<'a, T> BorrowPlace<&'a T> forRefHandle<'a, T> {
I didn’t know you could do that! Oh wait, you can’t yet, I guess — looks like that would require some features still in prototype stage (Generic Constant Arguments MVP)?
Sure, that part makes sense. I guess since this doesn’t have any actual participation in the type system (unlike marker traits) I would have expected it to be a builtin attribute instead.
// Tell the borrow checker that multiple references can be made to the // same place at the same time: #[access_kind(Shared)] unsafe impl<'a, T> BorrowPlace<&'a T> for RefHandle<'a, T> {score 1 · canonical
But you cannot predicate on attributes in bounds. Like
T: BorrowPlace<ACCESS = AccessKind::Shared>score 1 · canonical
I didn’t know you could do that! Oh wait, you can’t yet, I guess — looks like that would require some features still in prototype stage (Generic Constant Arguments MVP)?
score 1 · canonical