fix(rustup): static bounds required on Type definition, trivial_casts

This commit is contained in:
Kevin Butler
2015-03-26 16:02:04 +00:00
parent a10e7ded93
commit eee7a85d3c
9 changed files with 50 additions and 22 deletions

View File

@@ -354,7 +354,8 @@ mod tests {
#[test]
fn test_downcast_box_stream() {
let stream = box MockStream::new() as Box<NetworkStream + Send>;
// FIXME: Use Type ascription
let stream: Box<NetworkStream + Send> = box MockStream::new();
let mock = stream.downcast::<MockStream>().ok().unwrap();
assert_eq!(mock, box MockStream::new());
@@ -363,7 +364,8 @@ mod tests {
#[test]
fn test_downcast_unchecked_box_stream() {
let stream = box MockStream::new() as Box<NetworkStream + Send>;
// FIXME: Use Type ascription
let stream: Box<NetworkStream + Send> = box MockStream::new();
let mock = unsafe { stream.downcast_unchecked::<MockStream>() };
assert_eq!(mock, box MockStream::new());