From 9c9bb9ce1d51e2a9ca4963bd418e365b6e17fbfa Mon Sep 17 00:00:00 2001 From: Niko Matsakis Date: Tue, 24 Mar 2015 15:55:29 -0400 Subject: Implement `Reflect` trait with a variant on the standard OIBIT semantics that tests the *interface* of trait objects, rather than what they close over. --- src/test/run-pass/object-one-type-two-traits.rs | 2 +- src/test/run-pass/type-id-higher-rank.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/test/run-pass') diff --git a/src/test/run-pass/object-one-type-two-traits.rs b/src/test/run-pass/object-one-type-two-traits.rs index baf8c6e4c97..f4e056b3f21 100644 --- a/src/test/run-pass/object-one-type-two-traits.rs +++ b/src/test/run-pass/object-one-type-two-traits.rs @@ -30,7 +30,7 @@ impl Wrap for int { } } -fn is(x: &Any) -> bool { +fn is(x: &Any) -> bool { x.is::() } diff --git a/src/test/run-pass/type-id-higher-rank.rs b/src/test/run-pass/type-id-higher-rank.rs index 5670c45b68a..a40989d4e37 100644 --- a/src/test/run-pass/type-id-higher-rank.rs +++ b/src/test/run-pass/type-id-higher-rank.rs @@ -15,7 +15,7 @@ #![feature(unboxed_closures, core)] -use std::any::TypeId; +use std::any::{Any, TypeId}; fn main() { // Bare fns @@ -63,7 +63,7 @@ fn main() { assert!(a != b); } - fn id(_: T) -> TypeId { + fn id(_: T) -> TypeId { TypeId::of::() } } -- cgit 1.4.1-3-g733a5