[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20230627084202.1738047-1-aliceryhl@google.com>
Date: Tue, 27 Jun 2023 08:42:02 +0000
From: Alice Ryhl <aliceryhl@...gle.com>
To: benno.lossin@...ton.me
Cc: alex.gaynor@...il.com, aliceryhl@...gle.com,
bjorn3_gh@...tonmail.com, boqun.feng@...il.com, gary@...yguo.net,
jiangshanlai@...il.com, linux-kernel@...r.kernel.org,
ojeda@...nel.org, patches@...ts.linux.dev,
rust-for-linux@...r.kernel.org, tj@...nel.org, wedsonaf@...il.com
Subject: Re: [PATCH v2 5/8] rust: workqueue: add helper for defining
work_struct fields
Benno Lossin <benno.lossin@...ton.me> writes:
> On 01.06.23 15:49, Alice Ryhl wrote:
>> +/// # Safety
>> +///
>> +/// The [`OFFSET`] constant must be the offset of a field in Self of type [`Work<T, ID>`]. The methods on
>> +/// this trait must have exactly the behavior that the definitions given below have.
>
> I think you should just say "implementers are not allowed to implement
> the functions defined by this trait." I see no reason to allow that, since
> all functions are fully determined by the `OFFSET` constant.
The macro overrides one of the methods, so that wont work.
(It overrides the method to check that the field has the claimed type.)
I'll apply the rest of your suggestions.
Alice
Powered by blists - more mailing lists