Skip to content

Commit b29a6fb

Browse files
committed
Add missing dyn for cloudabi, redox, unix and wasm
1 parent 560d807 commit b29a6fb

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

src/libstd/sys/cloudabi/thread.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ unsafe impl Send for Thread {}
3232
unsafe impl Sync for Thread {}
3333

3434
impl Thread {
35-
pub unsafe fn new<'a>(stack: usize, p: Box<FnBox() + 'a>) -> io::Result<Thread> {
35+
pub unsafe fn new<'a>(stack: usize, p: Box<dyn FnBox() + 'a>) -> io::Result<Thread> {
3636
let p = box p;
3737
let mut native: libc::pthread_t = mem::zeroed();
3838
let mut attr: libc::pthread_attr_t = mem::zeroed();

src/libstd/sys/redox/thread.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ unsafe impl Send for Thread {}
2828
unsafe impl Sync for Thread {}
2929

3030
impl Thread {
31-
pub unsafe fn new<'a>(_stack: usize, p: Box<FnBox() + 'a>) -> io::Result<Thread> {
31+
pub unsafe fn new<'a>(_stack: usize, p: Box<dyn FnBox() + 'a>) -> io::Result<Thread> {
3232
let p = box p;
3333

3434
let id = cvt(syscall::clone(syscall::CLONE_VM | syscall::CLONE_FS | syscall::CLONE_FILES))?;

src/libstd/sys/unix/process/process_common.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ pub struct Command {
5252
uid: Option<uid_t>,
5353
gid: Option<gid_t>,
5454
saw_nul: bool,
55-
closures: Vec<Box<FnMut() -> io::Result<()> + Send + Sync>>,
55+
closures: Vec<Box<dyn FnMut() -> io::Result<()> + Send + Sync>>,
5656
stdin: Option<Stdio>,
5757
stdout: Option<Stdio>,
5858
stderr: Option<Stdio>,
@@ -155,12 +155,12 @@ impl Command {
155155
self.gid
156156
}
157157

158-
pub fn get_closures(&mut self) -> &mut Vec<Box<FnMut() -> io::Result<()> + Send + Sync>> {
158+
pub fn get_closures(&mut self) -> &mut Vec<Box<dyn FnMut() -> io::Result<()> + Send + Sync>> {
159159
&mut self.closures
160160
}
161161

162162
pub fn before_exec(&mut self,
163-
f: Box<FnMut() -> io::Result<()> + Send + Sync>) {
163+
f: Box<dyn FnMut() -> io::Result<()> + Send + Sync>) {
164164
self.closures.push(f);
165165
}
166166

src/libstd/sys/unix/thread.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ unsafe fn pthread_attr_setstacksize(_attr: *mut libc::pthread_attr_t,
4949
}
5050

5151
impl Thread {
52-
pub unsafe fn new<'a>(stack: usize, p: Box<FnBox() + 'a>)
52+
pub unsafe fn new<'a>(stack: usize, p: Box<dyn FnBox() + 'a>)
5353
-> io::Result<Thread> {
5454
let p = box p;
5555
let mut native: libc::pthread_t = mem::zeroed();

src/libstd/sys/wasm/thread.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ pub struct Thread(Void);
1919
pub const DEFAULT_MIN_STACK_SIZE: usize = 4096;
2020

2121
impl Thread {
22-
pub unsafe fn new<'a>(_stack: usize, _p: Box<FnBox() + 'a>)
22+
pub unsafe fn new<'a>(_stack: usize, _p: Box<dyn FnBox() + 'a>)
2323
-> io::Result<Thread>
2424
{
2525
unsupported()

0 commit comments

Comments
 (0)