mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-30 00:20:36 +00:00
12 lines
634 B
Text
12 lines
634 B
Text
error: a `const` item should not be interior mutable
|
|
--> tests/ui/crashes/ice-9445.rs:1:1
|
|
|
|
|
LL | const UNINIT: core::mem::MaybeUninit<core::cell::Cell<&'static ()>> = core::mem::MaybeUninit::uninit();
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= help: consider making this `Sync` so that it can go in a static item or using a `thread_local`
|
|
= note: `-D clippy::declare-interior-mutable-const` implied by `-D warnings`
|
|
= help: to override `-D warnings` add `#[allow(clippy::declare_interior_mutable_const)]`
|
|
|
|
error: aborting due to 1 previous error
|
|
|