Attribute of a Variable

HI! I want to add some attributes to variables like this

#[dirty]
let a: u32 = 1;
#[clean]
let b :u32 = 2;

How can I do this? Moreover, I want to access these attributes in LLVM. Can anybody please help me with this…

You can check the attrs field of a Local item in the AST.

1 Like

Can you please specify how to use this? I didn’t find any clear documentation.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.