Skip to content

Commit

Permalink
Merge tag 'rust-fixes-6.5-rc7' of https://github.com/Rust-for-Linux/l…
Browse files Browse the repository at this point in the history
…inux

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`)
  • Loading branch information
Linus Torvalds committed Aug 20, 2023
2 parents 9e6c269 + 3fa7187 commit ec27a63
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions rust/macros/vtable.rs
Original file line number Diff line number Diff line change
@@ -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();

0 comments on commit ec27a63

Please sign in to comment.