diff options
author | 2023-08-20 08:18:58 +0200 | |
---|---|---|
committer | 2023-08-20 08:18:58 +0200 | |
commit | ec27a636d7e1aa05e64ef0b1bd848f27f8105a39 (patch) | |
tree | dea0963ed682384586edcccc887af0a2c231bed4 | |
parent | Merge tag 'i2c-for-6.5-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux (diff) | |
parent | rust: macros: vtable: fix `HAS_*` redefinition (`gen_const_name`) (diff) | |
download | wireguard-linux-ec27a636d7e1aa05e64ef0b1bd848f27f8105a39.tar.xz wireguard-linux-ec27a636d7e1aa05e64ef0b1bd848f27f8105a39.zip |
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.rs | 1 |
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(); |