From: kernel test robot <lkp@intel.com>
To: Boqun Feng <boqun.feng@gmail.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
Alice Ryhl <aliceryhl@google.com>,
Benno Lossin <lossin@kernel.org>
Subject: [boqun:rust-atomic-impl 2/11] warning: type `AtomicRepr<Self>` is more private than the item `AtomicArithmeticOps::atomic_add`
Date: Sun, 20 Jul 2025 18:12:27 +0200 [thread overview]
Message-ID: <202507201810.IcWDSM7C-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/boqun/linux.git rust-atomic-impl
head: 9908e69eba39eeef235e409a753621914c6e8926
commit: 43940d5844482f5eb43e365e11575cec3a5bc91d [2/11] rust: sync: Add basic atomic operation mapping framework
config: x86_64-rhel-9.4-rust (https://download.01.org/0day-ci/archive/20250720/202507201810.IcWDSM7C-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/20250720/202507201810.IcWDSM7C-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/202507201810.IcWDSM7C-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> warning: type `AtomicRepr<Self>` is more private than the item `AtomicBasicOps::atomic_read_acquire`
--> rust/kernel/sync/atomic/ops.rs:65:13
|
65 | fn [< atomic_ $func >]($($arg: $arg_type,)*) $(-> $ret)?;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ associated function `AtomicBasicOps::atomic_read_acquire` is reachable at visibility `pub`
...
185 | / declare_and_impl_atomic_methods!(
186 | | /// Basic atomic operations
187 | | pub trait AtomicBasicOps {
188 | | /// Atomic read (load).
... |
200 | | );
| |_- in this macro invocation
|
note: but type `AtomicRepr<Self>` is only usable at visibility `pub(in crate::sync::atomic)`
--> rust/kernel/sync/atomic/ops.rs:45:1
|
45 | pub(super) struct AtomicRepr<T: AtomicImpl>(core::cell::UnsafeCell<T>);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: `#[warn(private_interfaces)]` on by default
= note: this warning originates in the macro `declare_atomic_method` which comes from the expansion of the macro `declare_and_impl_atomic_methods` (in Nightly builds, run with -Z macro-backtrace for more info)
--
>> warning: type `AtomicRepr<Self>` is more private than the item `AtomicBasicOps::atomic_read`
--> rust/kernel/sync/atomic/ops.rs:65:13
|
65 | fn [< atomic_ $func >]($($arg: $arg_type,)*) $(-> $ret)?;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ associated function `AtomicBasicOps::atomic_read` is reachable at visibility `pub`
...
185 | / declare_and_impl_atomic_methods!(
186 | | /// Basic atomic operations
187 | | pub trait AtomicBasicOps {
188 | | /// Atomic read (load).
... |
200 | | );
| |_- in this macro invocation
|
note: but type `AtomicRepr<Self>` is only usable at visibility `pub(in crate::sync::atomic)`
--> rust/kernel/sync/atomic/ops.rs:45:1
|
45 | pub(super) struct AtomicRepr<T: AtomicImpl>(core::cell::UnsafeCell<T>);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: this warning originates in the macro `declare_atomic_method` which comes from the expansion of the macro `declare_and_impl_atomic_methods` (in Nightly builds, run with -Z macro-backtrace for more info)
--
>> warning: type `AtomicRepr<i64>` is more private than the item `<i64 as AtomicBasicOps>::atomic_set_release`
--> rust/kernel/sync/atomic/ops.rs:105:13
|
105 | fn [< atomic_ $func >]($($arg: $arg_type,)*) $(-> $ret)? {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ associated function `<i64 as AtomicBasicOps>::atomic_set_release` is reachable at visibility `pub`
...
185 | / declare_and_impl_atomic_methods!(
186 | | /// Basic atomic operations
187 | | pub trait AtomicBasicOps {
188 | | /// Atomic read (load).
... |
200 | | );
| |_- in this macro invocation
|
note: but type `AtomicRepr<i64>` is only usable at visibility `pub(in crate::sync::atomic)`
--> rust/kernel/sync/atomic/ops.rs:45:1
|
45 | pub(super) struct AtomicRepr<T: AtomicImpl>(core::cell::UnsafeCell<T>);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: this warning originates in the macro `impl_atomic_method` which comes from the expansion of the macro `declare_and_impl_atomic_methods` (in Nightly builds, run with -Z macro-backtrace for more info)
--
>> warning: type `AtomicRepr<i64>` is more private than the item `<i64 as AtomicBasicOps>::atomic_set`
--> rust/kernel/sync/atomic/ops.rs:105:13
|
105 | fn [< atomic_ $func >]($($arg: $arg_type,)*) $(-> $ret)? {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ associated function `<i64 as AtomicBasicOps>::atomic_set` is reachable at visibility `pub`
...
185 | / declare_and_impl_atomic_methods!(
186 | | /// Basic atomic operations
187 | | pub trait AtomicBasicOps {
188 | | /// Atomic read (load).
... |
200 | | );
| |_- in this macro invocation
|
note: but type `AtomicRepr<i64>` is only usable at visibility `pub(in crate::sync::atomic)`
--> rust/kernel/sync/atomic/ops.rs:45:1
|
45 | pub(super) struct AtomicRepr<T: AtomicImpl>(core::cell::UnsafeCell<T>);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: this warning originates in the macro `impl_atomic_method` which comes from the expansion of the macro `declare_and_impl_atomic_methods` (in Nightly builds, run with -Z macro-backtrace for more info)
--
>> warning: type `AtomicRepr<Self>` is more private than the item `AtomicExchangeOps::atomic_xchg_acquire`
--> rust/kernel/sync/atomic/ops.rs:65:13
|
65 | fn [< atomic_ $func >]($($arg: $arg_type,)*) $(-> $ret)?;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ associated function `AtomicExchangeOps::atomic_xchg_acquire` is reachable at visibility `pub`
...
202 | / declare_and_impl_atomic_methods!(
203 | | /// Exchange and compare-and-exchange atomic operations
204 | | pub trait AtomicExchangeOps {
205 | | /// Atomic exchange.
... |
227 | | );
| |_- in this macro invocation
|
note: but type `AtomicRepr<Self>` is only usable at visibility `pub(in crate::sync::atomic)`
--> rust/kernel/sync/atomic/ops.rs:45:1
|
45 | pub(super) struct AtomicRepr<T: AtomicImpl>(core::cell::UnsafeCell<T>);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: this warning originates in the macro `declare_atomic_method` which comes from the expansion of the macro `declare_and_impl_atomic_methods` (in Nightly builds, run with -Z macro-backtrace for more info)
--
>> warning: type `AtomicRepr<Self>` is more private than the item `AtomicExchangeOps::atomic_xchg_release`
--> rust/kernel/sync/atomic/ops.rs:65:13
|
65 | fn [< atomic_ $func >]($($arg: $arg_type,)*) $(-> $ret)?;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ associated function `AtomicExchangeOps::atomic_xchg_release` is reachable at visibility `pub`
...
202 | / declare_and_impl_atomic_methods!(
203 | | /// Exchange and compare-and-exchange atomic operations
204 | | pub trait AtomicExchangeOps {
205 | | /// Atomic exchange.
... |
227 | | );
| |_- in this macro invocation
|
note: but type `AtomicRepr<Self>` is only usable at visibility `pub(in crate::sync::atomic)`
--> rust/kernel/sync/atomic/ops.rs:45:1
|
45 | pub(super) struct AtomicRepr<T: AtomicImpl>(core::cell::UnsafeCell<T>);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: this warning originates in the macro `declare_atomic_method` which comes from the expansion of the macro `declare_and_impl_atomic_methods` (in Nightly builds, run with -Z macro-backtrace for more info)
--
>> warning: type `AtomicRepr<Self>` is more private than the item `AtomicExchangeOps::atomic_xchg_relaxed`
--> rust/kernel/sync/atomic/ops.rs:65:13
|
65 | fn [< atomic_ $func >]($($arg: $arg_type,)*) $(-> $ret)?;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ associated function `AtomicExchangeOps::atomic_xchg_relaxed` is reachable at visibility `pub`
...
202 | / declare_and_impl_atomic_methods!(
203 | | /// Exchange and compare-and-exchange atomic operations
204 | | pub trait AtomicExchangeOps {
205 | | /// Atomic exchange.
... |
227 | | );
| |_- in this macro invocation
|
note: but type `AtomicRepr<Self>` is only usable at visibility `pub(in crate::sync::atomic)`
--> rust/kernel/sync/atomic/ops.rs:45:1
|
45 | pub(super) struct AtomicRepr<T: AtomicImpl>(core::cell::UnsafeCell<T>);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: this warning originates in the macro `declare_atomic_method` which comes from the expansion of the macro `declare_and_impl_atomic_methods` (in Nightly builds, run with -Z macro-backtrace for more info)
--
>> warning: type `AtomicRepr<Self>` is more private than the item `AtomicExchangeOps::atomic_xchg`
--> rust/kernel/sync/atomic/ops.rs:65:13
|
65 | fn [< atomic_ $func >]($($arg: $arg_type,)*) $(-> $ret)?;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ associated function `AtomicExchangeOps::atomic_xchg` is reachable at visibility `pub`
...
202 | / declare_and_impl_atomic_methods!(
203 | | /// Exchange and compare-and-exchange atomic operations
204 | | pub trait AtomicExchangeOps {
205 | | /// Atomic exchange.
... |
227 | | );
| |_- in this macro invocation
|
note: but type `AtomicRepr<Self>` is only usable at visibility `pub(in crate::sync::atomic)`
--> rust/kernel/sync/atomic/ops.rs:45:1
|
45 | pub(super) struct AtomicRepr<T: AtomicImpl>(core::cell::UnsafeCell<T>);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: this warning originates in the macro `declare_atomic_method` which comes from the expansion of the macro `declare_and_impl_atomic_methods` (in Nightly builds, run with -Z macro-backtrace for more info)
--
>> warning: type `AtomicRepr<Self>` is more private than the item `AtomicExchangeOps::atomic_try_cmpxchg_acquire`
--> rust/kernel/sync/atomic/ops.rs:65:13
|
65 | fn [< atomic_ $func >]($($arg: $arg_type,)*) $(-> $ret)?;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ associated function `AtomicExchangeOps::atomic_try_cmpxchg_acquire` is reachable at visibility `pub`
...
202 | / declare_and_impl_atomic_methods!(
203 | | /// Exchange and compare-and-exchange atomic operations
204 | | pub trait AtomicExchangeOps {
205 | | /// Atomic exchange.
... |
227 | | );
| |_- in this macro invocation
|
note: but type `AtomicRepr<Self>` is only usable at visibility `pub(in crate::sync::atomic)`
--> rust/kernel/sync/atomic/ops.rs:45:1
|
45 | pub(super) struct AtomicRepr<T: AtomicImpl>(core::cell::UnsafeCell<T>);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: this warning originates in the macro `declare_atomic_method` which comes from the expansion of the macro `declare_and_impl_atomic_methods` (in Nightly builds, run with -Z macro-backtrace for more info)
--
>> warning: type `AtomicRepr<Self>` is more private than the item `AtomicExchangeOps::atomic_try_cmpxchg_release`
--> rust/kernel/sync/atomic/ops.rs:65:13
|
65 | fn [< atomic_ $func >]($($arg: $arg_type,)*) $(-> $ret)?;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ associated function `AtomicExchangeOps::atomic_try_cmpxchg_release` is reachable at visibility `pub`
...
202 | / declare_and_impl_atomic_methods!(
203 | | /// Exchange and compare-and-exchange atomic operations
204 | | pub trait AtomicExchangeOps {
205 | | /// Atomic exchange.
... |
227 | | );
| |_- in this macro invocation
|
note: but type `AtomicRepr<Self>` is only usable at visibility `pub(in crate::sync::atomic)`
--> rust/kernel/sync/atomic/ops.rs:45:1
|
45 | pub(super) struct AtomicRepr<T: AtomicImpl>(core::cell::UnsafeCell<T>);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: this warning originates in the macro `declare_atomic_method` which comes from the expansion of the macro `declare_and_impl_atomic_methods` (in Nightly builds, run with -Z macro-backtrace for more info)
--
>> warning: type `AtomicRepr<Self>` is more private than the item `AtomicExchangeOps::atomic_try_cmpxchg_relaxed`
--> rust/kernel/sync/atomic/ops.rs:65:13
|
65 | fn [< atomic_ $func >]($($arg: $arg_type,)*) $(-> $ret)?;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ associated function `AtomicExchangeOps::atomic_try_cmpxchg_relaxed` is reachable at visibility `pub`
...
202 | / declare_and_impl_atomic_methods!(
203 | | /// Exchange and compare-and-exchange atomic operations
204 | | pub trait AtomicExchangeOps {
205 | | /// Atomic exchange.
... |
227 | | );
| |_- in this macro invocation
|
note: but type `AtomicRepr<Self>` is only usable at visibility `pub(in crate::sync::atomic)`
--> rust/kernel/sync/atomic/ops.rs:45:1
|
45 | pub(super) struct AtomicRepr<T: AtomicImpl>(core::cell::UnsafeCell<T>);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: this warning originates in the macro `declare_atomic_method` which comes from the expansion of the macro `declare_and_impl_atomic_methods` (in Nightly builds, run with -Z macro-backtrace for more info)
..
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next reply other threads:[~2025-07-20 16:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-20 16:12 kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2025-07-17 1:08 [boqun:rust-atomic-impl 2/11] warning: type `AtomicRepr<Self>` is more private than the item `AtomicArithmeticOps::atomic_add` kernel test robot
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=202507201810.IcWDSM7C-lkp@intel.com \
--to=lkp@intel.com \
--cc=aliceryhl@google.com \
--cc=boqun.feng@gmail.com \
--cc=llvm@lists.linux.dev \
--cc=lossin@kernel.org \
--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).