File tree 9 files changed +13
-22
lines changed
9 files changed +13
-22
lines changed Original file line number Diff line number Diff line change 73
73
74
74
use fmt;
75
75
use intrinsics;
76
- use marker:: Reflect ;
77
76
78
77
///////////////////////////////////////////////////////////////////////////////
79
78
// Any trait
@@ -86,7 +85,7 @@ use marker::Reflect;
86
85
///
87
86
/// [mod]: index.html
88
87
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
89
- pub trait Any : Reflect + ' static {
88
+ pub trait Any : ' static {
90
89
/// Gets the `TypeId` of `self`.
91
90
///
92
91
/// # Examples
@@ -112,7 +111,7 @@ pub trait Any: Reflect + 'static {
112
111
}
113
112
114
113
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
115
- impl < T : Reflect + ' static + ?Sized > Any for T {
114
+ impl < T : ' static + ?Sized > Any for T {
116
115
fn get_type_id ( & self ) -> TypeId { TypeId :: of :: < T > ( ) }
117
116
}
118
117
@@ -366,7 +365,7 @@ impl TypeId {
366
365
/// }
367
366
/// ```
368
367
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
369
- pub fn of < T : ?Sized + Reflect + ' static > ( ) -> TypeId {
368
+ pub fn of < T : ?Sized + ' static > ( ) -> TypeId {
370
369
TypeId {
371
370
t : unsafe { intrinsics:: type_id :: < T > ( ) } ,
372
371
}
Original file line number Diff line number Diff line change @@ -587,11 +587,14 @@ mod impls {
587
587
#[ unstable( feature = "reflect_marker" ,
588
588
reason = "requires RFC and more experience" ,
589
589
issue = "27749" ) ]
590
+ #[ rustc_deprecated( since = "1.14.0" , reason = "Specialization makes parametricity impossible" ) ]
590
591
#[ rustc_on_unimplemented = "`{Self}` does not implement `Any`; \
591
592
ensure all type parameters are bounded by `Any`"]
592
593
pub trait Reflect { }
593
594
594
595
#[ unstable( feature = "reflect_marker" ,
595
596
reason = "requires RFC and more experience" ,
596
597
issue = "27749" ) ]
598
+ #[ rustc_deprecated( since = "1.14.0" , reason = "Specialization makes parametricity impossible" ) ]
599
+ #[ allow( deprecated) ]
597
600
impl Reflect for .. { }
Original file line number Diff line number Diff line change @@ -55,15 +55,14 @@ use any::TypeId;
55
55
use cell;
56
56
use char;
57
57
use fmt:: { self , Debug , Display } ;
58
- use marker:: Reflect ;
59
58
use mem:: transmute;
60
59
use num;
61
60
use str;
62
61
use string;
63
62
64
63
/// Base functionality for all errors in Rust.
65
64
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
66
- pub trait Error : Debug + Display + Reflect {
65
+ pub trait Error : Debug + Display {
67
66
/// A short description of the error.
68
67
///
69
68
/// The description should not contain newlines or sentence-ending
Original file line number Diff line number Diff line change 12
12
13
13
use io:: prelude:: * ;
14
14
15
- use marker:: Reflect ;
16
15
use cmp;
17
16
use error;
18
17
use fmt;
@@ -578,7 +577,7 @@ impl<W> From<IntoInnerError<W>> for Error {
578
577
}
579
578
580
579
#[ 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 > {
582
581
fn description ( & self ) -> & str {
583
582
error:: Error :: description ( self . error ( ) )
584
583
}
Original file line number Diff line number Diff line change 258
258
#![ cfg_attr( stage0, feature( question_mark) ) ]
259
259
#![ feature( rand) ]
260
260
#![ feature( raw) ]
261
- #![ feature( reflect_marker) ]
262
261
#![ feature( repr_simd) ]
263
262
#![ feature( rustc_attrs) ]
264
263
#![ feature( shared) ]
Original file line number Diff line number Diff line change @@ -270,7 +270,6 @@ use error;
270
270
use fmt;
271
271
use mem;
272
272
use cell:: UnsafeCell ;
273
- use marker:: Reflect ;
274
273
use time:: { Duration , Instant } ;
275
274
276
275
#[ unstable( feature = "mpsc_select" , issue = "27800" ) ]
@@ -1163,7 +1162,7 @@ impl<T> fmt::Display for SendError<T> {
1163
1162
}
1164
1163
1165
1164
#[ 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 > {
1167
1166
fn description ( & self ) -> & str {
1168
1167
"sending on a closed channel"
1169
1168
}
@@ -1198,7 +1197,7 @@ impl<T> fmt::Display for TrySendError<T> {
1198
1197
}
1199
1198
1200
1199
#[ 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 > {
1202
1201
1203
1202
fn description ( & self ) -> & str {
1204
1203
match * self {
Original file line number Diff line number Diff line change 10
10
11
11
use error:: { Error } ;
12
12
use fmt;
13
- use marker:: Reflect ;
14
13
use sync:: atomic:: { AtomicBool , Ordering } ;
15
14
use thread;
16
15
@@ -117,7 +116,7 @@ impl<T> fmt::Display for PoisonError<T> {
117
116
}
118
117
119
118
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
120
- impl < T : Reflect > Error for PoisonError < T > {
119
+ impl < T > Error for PoisonError < T > {
121
120
fn description ( & self ) -> & str {
122
121
"poisoned lock: another task failed inside"
123
122
}
@@ -174,7 +173,7 @@ impl<T> fmt::Display for TryLockError<T> {
174
173
}
175
174
176
175
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
177
- impl < T : Reflect > Error for TryLockError < T > {
176
+ impl < T > Error for TryLockError < T > {
178
177
fn description ( & self ) -> & str {
179
178
match * self {
180
179
TryLockError :: Poisoned ( ref p) => p. description ( ) ,
Original file line number Diff line number Diff line change 8
8
// option. This file may not be copied, modified, or distributed
9
9
// except according to those terms.
10
10
11
- #![ feature( reflect_marker) ]
12
-
13
- use std:: marker:: Reflect ;
14
11
use std:: any:: Any ;
15
12
16
13
struct Foo ;
Original file line number Diff line number Diff line change 8
8
// option. This file may not be copied, modified, or distributed
9
9
// except according to those terms.
10
10
11
- #![ feature( reflect_marker) ]
12
-
13
11
use std:: any:: TypeId ;
14
- use std:: marker:: Reflect ;
15
12
use std:: rc:: Rc ;
16
13
17
14
type Fp < T > = Rc < T > ;
18
15
19
16
struct Engine ;
20
17
21
- trait Component : ' static + Reflect { }
18
+ trait Component : ' static { }
22
19
impl Component for Engine { }
23
20
24
21
trait Env {
You can’t perform that action at this time.
0 commit comments