lkml.org 
[lkml]   [2024]   [Apr]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] rust: init: change the generated name of guard variables
On 03.04.24 23:20, Boqun Feng wrote:
> On Wed, Apr 03, 2024 at 07:43:37PM +0000, Benno Lossin wrote:
>> The initializers created by the `[try_][pin_]init!` macros utilize the
>> guard pattern to drop already initialized fields, when initialization
>> fails mid-way. These guards are generated to have the same name as the
>> field that they handle. To prevent namespacing issues when the field
>
> Do you have an example of this kind of issues?

https://lore.kernel.org/rust-for-linux/1e8a2a1f-abbf-44ba-8344-705a9cbb1627@proton.me/

--
Cheers,
Benno


\
 
 \ /
  Last update: 2024-05-27 16:23    [W:0.122 / U:0.316 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site