Skip to content

Commit cdb53d8

Browse files
committed
add rustc_diagnostic_item for Cell & SyncUnsafeCell
1 parent a60a9e5 commit cdb53d8

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

compiler/rustc_span/src/symbol.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,7 @@ symbols! {
170170
CallOnceFuture,
171171
CallRefFuture,
172172
Capture,
173+
Cell,
173174
Center,
174175
Cleanup,
175176
Clone,
@@ -321,6 +322,7 @@ symbols! {
321322
SubdiagMessage,
322323
Subdiagnostic,
323324
Sync,
325+
SyncUnsafeCell,
324326
T,
325327
Target,
326328
ToOwned,

library/core/src/cell.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,7 @@ pub use once::OnceCell;
304304
/// ```
305305
///
306306
/// See the [module-level documentation](self) for more.
307+
#[cfg_attr(not(test), rustc_diagnostic_item = "Cell")]
307308
#[stable(feature = "rust1", since = "1.0.0")]
308309
#[repr(transparent)]
309310
pub struct Cell<T: ?Sized> {
@@ -2295,6 +2296,7 @@ impl<T> UnsafeCell<*mut T> {
22952296
/// making this type just as unsafe to use.
22962297
///
22972298
/// See [`UnsafeCell`] for details.
2299+
#[cfg_attr(not(test), rustc_diagnostic_item = "SyncUnsafeCell")]
22982300
#[unstable(feature = "sync_unsafe_cell", issue = "95439")]
22992301
#[repr(transparent)]
23002302
pub struct SyncUnsafeCell<T: ?Sized> {

0 commit comments

Comments
 (0)