Messages in this thread | | | From | Miguel Ojeda <> | Date | Wed, 9 Aug 2023 21:28:55 +0200 | Subject | Re: [PATCH v3] rust: macros: vtable: fix `HAS_*` redefinition (`gen_const_name`) |
| |
On Tue, Aug 8, 2023 at 4:54 AM Qingsong Chen <changxian.cqs@antgroup.com> wrote: > > 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: b44becc5ee80 ("rust: macros: add `#[vtable]` proc macro") > Signed-off-by: Qingsong Chen <changxian.cqs@antgroup.com>
Applied to `rust-fixes`, thanks everyone!
Cheers, Miguel
| |