Re: [PATCH v8 15/29] rust: alloc: introduce `ArrayLayout`

From: kernel test robot
Date: Wed Oct 02 2024 - 20:28:01 EST


Hi Danilo,

kernel test robot noticed the following build errors:

[auto build test ERROR on 9852d85ec9d492ebef56dc5f229416c925758edc]

url: https://github.com/intel-lab-lkp/linux/commits/Danilo-Krummrich/rust-alloc-add-Allocator-trait/20241001-230558
base: 9852d85ec9d492ebef56dc5f229416c925758edc
patch link: https://lore.kernel.org/r/20241001150008.183102-16-dakr%40kernel.org
patch subject: [PATCH v8 15/29] rust: alloc: introduce `ArrayLayout`
config: riscv-randconfig-001-20241002 (https://download.01.org/0day-ci/archive/20241003/202410030724.cV9BEoNG-lkp@xxxxxxxxx/config)
compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241003/202410030724.cV9BEoNG-lkp@xxxxxxxxx/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202410030724.cV9BEoNG-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

>> error[E0425]: cannot find function `size_of` in this scope
--> rust/kernel/alloc/layout.rs:47:31
|
47 | match len.checked_mul(size_of::<T>()) {
| ^^^^^^^ not found in this scope
|
help: consider importing this function
|
7 + use core::mem::size_of;
|

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki