Skip to content

Commit d12a980

Browse files
committed
rust: fix rust-analyzer warning in macro
I get the following warning when using rust-analyzer and the `module` macro: Static variable `__rust_fs_4` should have UPPER_SNAKE_CASE name, e.g. `__RUST_FS_4` This patch emits an uppercase name for the static, which makes the warning go away. Signed-off-by: Wedson Almeida Filho <[email protected]>
1 parent 3d414ec commit d12a980

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

rust/macros/module.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ impl<'a> ModInfoBuilder<'a> {
8080
} else {
8181
"#[cfg(MODULE)]"
8282
},
83-
module = self.module,
83+
module = self.module.to_uppercase(),
8484
counter = self.counter,
8585
length = string.len(),
8686
string = Literal::byte_string(string.as_bytes()),

0 commit comments

Comments
 (0)