summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2023-08-20 08:18:58 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2023-08-20 08:18:58 +0200
commitec27a636d7e1aa05e64ef0b1bd848f27f8105a39 (patch)
treedea0963ed682384586edcccc887af0a2c231bed4
parent9e6c269de404bef2fb50b9407e988083a0805e3b (diff)
parent3fa7187eceee11998f756481e45ce8c4f9d9dc48 (diff)
Merge tag 'rust-fixes-6.5-rc7' of https://github.com/Rust-for-Linux/linux
Pull rust fix from Miguel Ojeda: - Macros: fix 'HAS_*' redefinition by the '#[vtable]' macro under conditional compilation * tag 'rust-fixes-6.5-rc7' of https://github.com/Rust-for-Linux/linux: rust: macros: vtable: fix `HAS_*` redefinition (`gen_const_name`)
-rw-r--r--rust/macros/vtable.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/rust/macros/vtable.rs b/rust/macros/vtable.rs
index 34d5e7fb5768..ee06044fcd4f 100644
--- a/rust/macros/vtable.rs
+++ b/rust/macros/vtable.rs
@@ -74,6 +74,7 @@ pub(crate) fn vtable(_attr: TokenStream, ts: TokenStream) -> TokenStream {
const {gen_const_name}: bool = false;",
)
.unwrap();
+ consts.insert(gen_const_name);
}
} else {
const_items = "const USE_VTABLE_ATTR: () = ();".to_owned();