On 12/1/25 2:50 PM, Miguel Ojeda wrote:
> On Mon, Dec 1, 2025 at 11:18 PM John Hubbard <[email protected]> wrote:
>>
>> But for API developers, the problem with doctests is that no one has ever
>> actually *run* the code. It's just a build test. And so critical bugs, such
>> as the kernel crash/hang below, are missed.
> 
> No, it is not just a build test. Doctests are actually transformed
> into KUnit tests automatically, and `assert!`s inside them actually
> report back to KUnit too.

I somehow failed to really internalize the connection to KUnit (or
to even remember it). Joel pointed it out too.

> 
> It was a major hack to implement, but I am proud of that one :)
> 
> That also allows us to build them with Clippy, to e.g. get the safety
> comments right, which is something normal Rust doesn't support yet.
> 
> We are actually getting a feature from upstream Rust to support it all
> in a stable and nice way!
> 



thanks,
-- 
John Hubbard

Reply via email to