diff options
| author | bors <bors@rust-lang.org> | 2016-01-17 08:40:01 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2016-01-17 08:40:01 +0000 |
| commit | 87608746f0c70b733f76eb5e8ff1d3346db63d3e (patch) | |
| tree | e7c8dfc7b376b5848d7deed89fdad560f0e9c797 /src/libcore | |
| parent | 88463364bfb675fdecd2bf9b70c589cc5e7cb2fb (diff) | |
| parent | 5d2275d53ec1f66527db9d903ed84a258927e0ba (diff) | |
Auto merge of #30928 - sfackler:any-unsized, r=aturon
This is a bit weird since unsized types can't be used in trait objects, but Any is *also* used as pure marker trait since Reflect isn't stable. There are many cases (e.g. TypeMap) where all you need is a TypeId. r? @aturon
Diffstat (limited to 'src/libcore')
| -rw-r--r-- | src/libcore/any.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libcore/any.rs b/src/libcore/any.rs index 2ad121b03fa..cb9bf935cdb 100644 --- a/src/libcore/any.rs +++ b/src/libcore/any.rs @@ -99,7 +99,7 @@ pub trait Any: Reflect + 'static { } #[stable(feature = "rust1", since = "1.0.0")] -impl<T: Reflect + 'static> Any for T { +impl<T: Reflect + 'static + ?Sized > Any for T { fn get_type_id(&self) -> TypeId { TypeId::of::<T>() } } |
