Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rust: macros: vtable: fix
HAS_*
redefinition (gen_const_name
)
If we define the same function name twice in a trait (using `#[cfg]`), the `vtable` macro will redefine its `gen_const_name`, e.g. this will define `HAS_BAR` twice: #[vtable] pub trait Foo { #[cfg(CONFIG_X)] fn bar(); #[cfg(not(CONFIG_X))] fn bar(x: usize); } Fixes: b44becc ("rust: macros: add `#[vtable]` proc macro") Signed-off-by: Qingsong Chen <[email protected]> Reviewed-by: Andreas Hindborg <[email protected]> Reviewed-by: Gary Guo <[email protected]> Reviewed-by: Sergio González Collado <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Miguel Ojeda <[email protected]>
- Loading branch information