linux/rust/macros
FUJITA Tomonori 81a304f5b3 rust: macros: ignore example with module parameters
`ModuleParamAccess` uses `SetOnce`, which depends on the helper functions
so the `macros` crate example under `rusttest` fails to build:

    ---- rust/macros/lib.rs - module (line 62) stdout ----
    error: linking with `cc` failed: exit status: 1
      |
      = note:  "cc" "-m64" ...
      = note: some arguments are omitted. use `--verbose` to show all linker arguments
      = note: rust-lld: error: undefined symbol: rust_helper_atomic_try_cmpxchg_relaxed
              >>> referenced by kernel.ecd446ce39a5fcbb-cgu.3
              >>>               kernel.kernel.ecd446ce39a5fcbb-cgu.3.rcgu.o:(kernel::sync::set_once::SetOnce$LT$T$GT$::populate::h8b02644e30bd70bc) in archive ./rust/test/libkernel.rlib

              rust-lld: error: undefined symbol: rust_helper_atomic_set_release
              >>> referenced by kernel.ecd446ce39a5fcbb-cgu.3
              >>>               kernel.kernel.ecd446ce39a5fcbb-cgu.3.rcgu.o:(kernel::sync::set_once::SetOnce$LT$T$GT$::populate::h8b02644e30bd70bc) in archive ./rust/test/libkernel.rlib
              collect2: error: ld returned 1 exit status

Thus ignore that example to fix the error.

[ Only the first one is needed (the other example does not use
  parameters), so we can keep it enabled. Thus I removed that second
  deletion (and reworded a bit).

  We may want to do something better here later on; on the other hand,
  we should get KUnit tests for `macros` too eventually, so we may end
  up removing or repurposing that target anyway, so it is not a big deal.

    - Miguel ]

Reported-by: Miguel Ojeda <ojeda@kernel.org>
Closes: https://lore.kernel.org/rust-for-linux/CANiq72mEYacdZmHKvpbahJzO_X_qqYyiSiSTYaWEQZAfp6sbxg@mail.gmail.com/
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
Fixes: 0b24f9740f ("rust: module: update the module macro with module parameter support")
Link: https://patch.msgid.link/20251210.082603.290476643413141778.fujita.tomonori@gmail.com
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
2026-01-14 19:52:43 +01:00
..
concat_idents.rs rust: macros: add concat_idents! proc macro 2022-12-04 01:59:04 +01:00
export.rs rust: add #[export] macro 2025-03-09 20:52:46 +01:00
fmt.rs rust: fmt: fix formatting expressions 2026-01-04 23:51:35 +01:00
helpers.rs rust: module: update the module macro with module parameter support 2025-11-03 14:42:29 +01:00
kunit.rs rust: kunit: allow cfg on tests 2025-09-16 08:26:56 -06:00
lib.rs rust: macros: ignore example with module parameters 2026-01-14 19:52:43 +01:00
module.rs Modules changes for v6.19-rc1 2025-12-06 08:27:07 -08:00
paste.rs rust: clean Rust 1.88.0's clippy::uninlined_format_args lint 2025-05-07 00:11:47 +02:00
quote.rs rust: support formatting of foreign types 2025-10-22 07:15:31 +02:00
vtable.rs rust: macros: vtable: fix HAS_* redefinition (gen_const_name) 2023-08-09 21:15:07 +02:00