Re: [PATCH] scripts: rust-analyzer: Skip crate module directories

From: Miguel Ojeda
Date: Thu Apr 06 2023 - 18:33:24 EST


On Tue, Mar 7, 2023 at 1:08 PM Andreas Hindborg <nmi@xxxxxxxxxxxx> wrote:
>
> When generating rust-analyzer configuration, skip module directories. This fixes
> an issue that occur if we have
>
> - drivers/block/driver.rs
> - drivers/block/driver_mod/mod.rs
>
> If `driver_mod` is a module of the crate `driver`, the directory `driver_mod`
> may not contain `Makefile`, and `generate_rust_analyzer.py` will fail.

I picked Lina's for `rust-fixes` from
https://github.com/Rust-for-Linux/linux/pull/883.

Cheers,
Miguel