File tree Expand file tree Collapse file tree 9 files changed +13
-22
lines changed Expand file tree Collapse file tree 9 files changed +13
-22
lines changed Original file line number Diff line number Diff line change 7373
7474use fmt;
7575use intrinsics;
76- use marker:: Reflect ;
7776
7877///////////////////////////////////////////////////////////////////////////////
7978// Any trait
@@ -86,7 +85,7 @@ use marker::Reflect;
8685///
8786/// [mod]: index.html
8887#[ stable( feature = "rust1" , since = "1.0.0" ) ]
89- pub trait Any : Reflect + ' static {
88+ pub trait Any : ' static {
9089 /// Gets the `TypeId` of `self`.
9190 ///
9291 /// # Examples
@@ -112,7 +111,7 @@ pub trait Any: Reflect + 'static {
112111}
113112
114113#[ stable( feature = "rust1" , since = "1.0.0" ) ]
115- impl < T : Reflect + ' static + ?Sized > Any for T {
114+ impl < T : ' static + ?Sized > Any for T {
116115 fn get_type_id ( & self ) -> TypeId { TypeId :: of :: < T > ( ) }
117116}
118117
@@ -366,7 +365,7 @@ impl TypeId {
366365 /// }
367366 /// ```
368367 #[ stable( feature = "rust1" , since = "1.0.0" ) ]
369- pub fn of < T : ?Sized + Reflect + ' static > ( ) -> TypeId {
368+ pub fn of < T : ?Sized + ' static > ( ) -> TypeId {
370369 TypeId {
371370 t : unsafe { intrinsics:: type_id :: < T > ( ) } ,
372371 }
Original file line number Diff line number Diff line change @@ -587,11 +587,14 @@ mod impls {
587587#[ unstable( feature = "reflect_marker" ,
588588 reason = "requires RFC and more experience" ,
589589 issue = "27749" ) ]
590+ #[ rustc_deprecated( since = "1.14.0" , reason = "Specialization makes parametricity impossible" ) ]
590591#[ rustc_on_unimplemented = "`{Self}` does not implement `Any`; \
591592 ensure all type parameters are bounded by `Any`"]
592593pub trait Reflect { }
593594
594595#[ unstable( feature = "reflect_marker" ,
595596 reason = "requires RFC and more experience" ,
596597 issue = "27749" ) ]
598+ #[ rustc_deprecated( since = "1.14.0" , reason = "Specialization makes parametricity impossible" ) ]
599+ #[ allow( deprecated) ]
597600impl Reflect for .. { }
Original file line number Diff line number Diff line change @@ -51,15 +51,14 @@ use any::TypeId;
5151use cell;
5252use char;
5353use fmt:: { self , Debug , Display } ;
54- use marker:: Reflect ;
5554use mem:: transmute;
5655use num;
5756use str;
5857use string;
5958
6059/// Base functionality for all errors in Rust.
6160#[ stable( feature = "rust1" , since = "1.0.0" ) ]
62- pub trait Error : Debug + Display + Reflect {
61+ pub trait Error : Debug + Display {
6362 /// A short description of the error.
6463 ///
6564 /// The description should not contain newlines or sentence-ending
Original file line number Diff line number Diff line change 1212
1313use io:: prelude:: * ;
1414
15- use marker:: Reflect ;
1615use cmp;
1716use error;
1817use fmt;
@@ -578,7 +577,7 @@ impl<W> From<IntoInnerError<W>> for Error {
578577}
579578
580579#[ stable( feature = "rust1" , since = "1.0.0" ) ]
581- impl < W : Reflect + Send + fmt:: Debug > error:: Error for IntoInnerError < W > {
580+ impl < W : Send + fmt:: Debug > error:: Error for IntoInnerError < W > {
582581 fn description ( & self ) -> & str {
583582 error:: Error :: description ( self . error ( ) )
584583 }
Original file line number Diff line number Diff line change 258258#![ cfg_attr( stage0, feature( question_mark) ) ]
259259#![ feature( rand) ]
260260#![ feature( raw) ]
261- #![ feature( reflect_marker) ]
262261#![ feature( repr_simd) ]
263262#![ feature( rustc_attrs) ]
264263#![ feature( shared) ]
Original file line number Diff line number Diff line change @@ -270,7 +270,6 @@ use error;
270270use fmt;
271271use mem;
272272use cell:: UnsafeCell ;
273- use marker:: Reflect ;
274273use time:: { Duration , Instant } ;
275274
276275#[ unstable( feature = "mpsc_select" , issue = "27800" ) ]
@@ -1163,7 +1162,7 @@ impl<T> fmt::Display for SendError<T> {
11631162}
11641163
11651164#[ stable( feature = "rust1" , since = "1.0.0" ) ]
1166- impl < T : Send + Reflect > error:: Error for SendError < T > {
1165+ impl < T : Send > error:: Error for SendError < T > {
11671166 fn description ( & self ) -> & str {
11681167 "sending on a closed channel"
11691168 }
@@ -1198,7 +1197,7 @@ impl<T> fmt::Display for TrySendError<T> {
11981197}
11991198
12001199#[ stable( feature = "rust1" , since = "1.0.0" ) ]
1201- impl < T : Send + Reflect > error:: Error for TrySendError < T > {
1200+ impl < T : Send > error:: Error for TrySendError < T > {
12021201
12031202 fn description ( & self ) -> & str {
12041203 match * self {
Original file line number Diff line number Diff line change 1010
1111use error:: { Error } ;
1212use fmt;
13- use marker:: Reflect ;
1413use sync:: atomic:: { AtomicBool , Ordering } ;
1514use thread;
1615
@@ -117,7 +116,7 @@ impl<T> fmt::Display for PoisonError<T> {
117116}
118117
119118#[ stable( feature = "rust1" , since = "1.0.0" ) ]
120- impl < T : Reflect > Error for PoisonError < T > {
119+ impl < T > Error for PoisonError < T > {
121120 fn description ( & self ) -> & str {
122121 "poisoned lock: another task failed inside"
123122 }
@@ -174,7 +173,7 @@ impl<T> fmt::Display for TryLockError<T> {
174173}
175174
176175#[ stable( feature = "rust1" , since = "1.0.0" ) ]
177- impl < T : Reflect > Error for TryLockError < T > {
176+ impl < T > Error for TryLockError < T > {
178177 fn description ( & self ) -> & str {
179178 match * self {
180179 TryLockError :: Poisoned ( ref p) => p. description ( ) ,
Original file line number Diff line number Diff line change 88// option. This file may not be copied, modified, or distributed
99// except according to those terms.
1010
11- #![ feature( reflect_marker) ]
12-
13- use std:: marker:: Reflect ;
1411use std:: any:: Any ;
1512
1613struct Foo ;
Original file line number Diff line number Diff line change 88// option. This file may not be copied, modified, or distributed
99// except according to those terms.
1010
11- #![ feature( reflect_marker) ]
12-
1311use std:: any:: TypeId ;
14- use std:: marker:: Reflect ;
1512use std:: rc:: Rc ;
1613
1714type Fp < T > = Rc < T > ;
1815
1916struct Engine ;
2017
21- trait Component : ' static + Reflect { }
18+ trait Component : ' static { }
2219impl Component for Engine { }
2320
2421trait Env {
You can’t perform that action at this time.
0 commit comments