Re: [PATCH v11 1/4] rust: types: Add Ownable/Owned types

From: Benno Lossin
Date: Tue Jul 08 2025 - 09:06:57 EST


On Tue Jul 8, 2025 at 12:16 PM CEST, Miguel Ojeda wrote:
> On Tue, Jul 8, 2025 at 11:57 AM Oliver Mangold <oliver.mangold@xxxxx> wrote:
>>
>> Note, though, that I already moved it from types.rs to types/ownable.rs on
>> request. It seems to me different people here have different ideas where it
>> should be placed. I feel now, that it would make sense to come to an
>> agreement between the interested parties about where it should finally be
>> placed, before I move it again. Could I ask that we settle that question
>> once and for all before my next revision?
>
> Yeah, if there is a disagreement with something said previously, then
> it should be resolved before starting to ping-pong between approaches
> with more and more patch versions. Reviewers can forget or they may
> not have read an earlier comment, but you did the right thing
> mentioning there is such a conflict in opinions.

Yeah, I checked and that was Andreas on v9. @Andreas what do you think?

I think we should just get rid of `types.rs` and split it into:

* `opaque.rs`
* `foreign.rs`
* `scope_guard.rs` (this might need a better name)

`Either` can just be removed entirely, `AlwaysRefcounted` & `ARef`
should be in the `sync` module (I already created an issue for this) as
well as `NotThreadSafe` (or we could create a `marker` module for that).
Thoughts?

---
Cheers,
Benno