Skip to content

Commit 4a71036

Browse files
committed
yeet, compiler impls
1 parent 319f0b2 commit 4a71036

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

compiler/rustc_data_structures/src/marker.rs

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
use std::alloc::Allocator;
22
use std::marker::PointeeSized;
3+
#[cfg(not(bootstrap))]
4+
use std::marker::Move;
35

46
#[diagnostic::on_unimplemented(message = "`{Self}` doesn't implement `DynSend`. \
57
Add it to `rustc_data_structures::marker` or use `IntoDynSyncSend` if it's already `Send`")]
@@ -25,6 +27,7 @@ macro_rules! impls_dyn_send_neg {
2527
}
2628

2729
// Consistent with `std`
30+
#[cfg(bootstrap)]
2831
impls_dyn_send_neg!(
2932
[std::env::Args]
3033
[std::env::ArgsOs]
@@ -40,6 +43,22 @@ impls_dyn_send_neg!(
4043
[std::io::StderrLock<'_>]
4144
);
4245

46+
#[cfg(not(bootstrap))]
47+
impls_dyn_send_neg!(
48+
[std::env::Args]
49+
[std::env::ArgsOs]
50+
[*const T where T: ?Sized + ?Move + PointeeSized]
51+
[*mut T where T: ?Sized + ?Move + PointeeSized]
52+
[std::ptr::NonNull<T> where T: ?Sized + ?Move + PointeeSized]
53+
[std::rc::Rc<T, A> where T: ?Sized + ?Move, A: Allocator]
54+
[std::rc::Weak<T, A> where T: ?Sized + ?Move, A: Allocator]
55+
[std::sync::MutexGuard<'_, T> where T: ?Sized + ?Move]
56+
[std::sync::RwLockReadGuard<'_, T> where T: ?Sized + ?Move]
57+
[std::sync::RwLockWriteGuard<'_, T> where T: ?Sized + ?Move]
58+
[std::io::StdoutLock<'_>]
59+
[std::io::StderrLock<'_>]
60+
);
61+
4362
#[cfg(any(
4463
unix,
4564
target_os = "hermit",
@@ -98,6 +117,7 @@ macro_rules! impls_dyn_sync_neg {
98117
}
99118

100119
// Consistent with `std`
120+
#[cfg(bootstrap)]
101121
impls_dyn_sync_neg!(
102122
[std::env::Args]
103123
[std::env::ArgsOs]
@@ -114,6 +134,23 @@ impls_dyn_sync_neg!(
114134
[std::sync::mpsc::Sender<T> where T]
115135
);
116136

137+
#[cfg(not(bootstrap))]
138+
impls_dyn_sync_neg!(
139+
[std::env::Args]
140+
[std::env::ArgsOs]
141+
[*const T where T: ?Sized + ?Move + PointeeSized]
142+
[*mut T where T: ?Sized + ?Move + PointeeSized]
143+
[std::cell::Cell<T> where T: ?Sized + ?Move ]
144+
[std::cell::RefCell<T> where T: ?Sized + ?Move ]
145+
[std::cell::UnsafeCell<T> where T: ?Sized + ?Move ]
146+
[std::ptr::NonNull<T> where T: ?Sized + ?Move + PointeeSized]
147+
[std::rc::Rc<T, A> where T: ?Sized + ?Move , A: Allocator]
148+
[std::rc::Weak<T, A> where T: ?Sized + ?Move , A: Allocator]
149+
[std::cell::OnceCell<T> where T]
150+
[std::sync::mpsc::Receiver<T> where T]
151+
[std::sync::mpsc::Sender<T> where T]
152+
);
153+
117154
#[cfg(any(
118155
unix,
119156
target_os = "hermit",

0 commit comments

Comments
 (0)