llvm.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Asahi Lina <lina@asahilina.net>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	Janne Grunau <j@jannau.net>
Subject: [asahilinux:bits/250-aop 62/85] error[E0624]: associated function `new` is private
Date: Wed, 6 Aug 2025 21:45:24 +0800	[thread overview]
Message-ID: <202508062159.3Mv8GqI4-lkp@intel.com> (raw)

tree:   https://github.com/AsahiLinux/linux bits/250-aop
head:   800be80e4ce2e4872e0d8f2716b2b7c79a0511ef
commit: 6fd37522db75e57a269d63a7230133f86f8018d6 [62/85] Rust: io: Add memcpy_fromio wrapper
config: x86_64-rhel-9.4-rust (https://download.01.org/0day-ci/archive/20250806/202508062159.3Mv8GqI4-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
rustc: rustc 1.88.0 (6b00bc388 2025-06-23)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250806/202508062159.3Mv8GqI4-lkp@intel.com/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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202508062159.3Mv8GqI4-lkp@intel.com/

All errors (new ones prefixed by >>):

>> error[E0624]: associated function `new` is private
   --> rust/doctests_kernel_generated.rs:4962:36
   |
   4962 |     let devres_mem = IoMem::<100>::new(res, device)?;
   |                                    ^^^ private associated function
   |
   ::: rust/kernel/io/mem.rs:122:5
   |
   122  |     pub(crate) fn new(resource: &Resource, device: &Device<Bound>) -> Result<Devres<Self>> {
   |     -------------------------------------------------------------------------------------- private associated function defined here
--
>> error[E0277]: the `?` operator can only be used on `Result`s, not `Option`s, in a function that returns `Result`
   --> rust/doctests_kernel_generated.rs:4964:38
   |
   4960 | fn test(device: &Device, res: Resource) -> Result {
   | ------------------------------------------------- this function returns a `Result`
   ...
   4964 |     let mem = devres_mem.try_access()?;
>> |                                      ^ use `.ok_or(...)?` to provide an error compatible with `core::result::Result<(), rust_doctest_kernel_alloc_kbox_rs_7::kernel::error::Error>`
--
>> error[E0412]: cannot find type `Device` in this scope
   --> rust/doctests_kernel_generated.rs:4960:18
   |
   4960 | fn test(device: &Device, res: Resource) -> Result {
   |                  ^^^^^^ not found in this scope
   |
   help: consider importing one of these structs
   |
   3    + use kernel::auxiliary::Device;
   |
   3    + use kernel::device::Device;
   |
   3    + use kernel::net::phy::Device;
   |
   3    + use kernel::pci::Device;
   |
   and 1 other candidate
--
>> error[E0603]: struct `Resource` is private
   --> rust/doctests_kernel_generated.rs:4958:22
   |
   4958 | use kernel::io::mem::Resource;
   |                      ^^^^^^^^ private struct
   |
   note: the struct `Resource` is defined here
   --> rust/kernel/io/mem.rs:13:5
   |
   13   | use crate::io::resource::Resource;
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   help: import `Resource` directly
   |
   4958 - use kernel::io::mem::Resource;
   4958 + use kernel::io::resource::Resource;
   |

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

                 reply	other threads:[~2025-08-06 13:45 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202508062159.3Mv8GqI4-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=j@jannau.net \
    --cc=lina@asahilina.net \
    --cc=llvm@lists.linux.dev \
    --cc=oe-kbuild-all@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).