Deny bare trait objects in src/libstd.

This commit is contained in:
ljedrz 2018-07-10 20:35:36 +02:00
parent 77117e3836
commit 560d8079ec
20 changed files with 99 additions and 98 deletions

View file

@ -1638,7 +1638,7 @@ impl<T: Send> error::Error for SendError<T> {
"sending on a closed channel"
}
fn cause(&self) -> Option<&error::Error> {
fn cause(&self) -> Option<&dyn error::Error> {
None
}
}
@ -1681,7 +1681,7 @@ impl<T: Send> error::Error for TrySendError<T> {
}
}
fn cause(&self) -> Option<&error::Error> {
fn cause(&self) -> Option<&dyn error::Error> {
None
}
}
@ -1709,7 +1709,7 @@ impl error::Error for RecvError {
"receiving on a closed channel"
}
fn cause(&self) -> Option<&error::Error> {
fn cause(&self) -> Option<&dyn error::Error> {
None
}
}
@ -1742,7 +1742,7 @@ impl error::Error for TryRecvError {
}
}
fn cause(&self) -> Option<&error::Error> {
fn cause(&self) -> Option<&dyn error::Error> {
None
}
}
@ -1783,7 +1783,7 @@ impl error::Error for RecvTimeoutError {
}
}
fn cause(&self) -> Option<&error::Error> {
fn cause(&self) -> Option<&dyn error::Error> {
None
}
}

View file

@ -93,7 +93,7 @@ pub struct Handle<'rx, T:Send+'rx> {
next: *mut Handle<'static, ()>,
prev: *mut Handle<'static, ()>,
added: bool,
packet: &'rx (Packet+'rx),
packet: &'rx (dyn Packet+'rx),
// due to our fun transmutes, we be sure to place this at the end. (nothing
// previous relies on T)