@@ -27,55 +27,55 @@ impl<'a> Test4 for Test3<'a> {
27
27
28
28
use std:: any:: Any ;
29
29
30
- pub fn test5 ( foo : & mut Box < Any > ) {
30
+ pub fn test5 ( foo : & mut Box < dyn Any > ) {
31
31
println ! ( "{:?}" , foo)
32
32
}
33
33
34
34
pub fn test6 ( ) {
35
- let foo: & Box < Any > ;
35
+ let foo: & Box < dyn Any > ;
36
36
}
37
37
38
38
struct Test7 < ' a > {
39
- foo : & ' a Box < Any > ,
39
+ foo : & ' a Box < dyn Any > ,
40
40
}
41
41
42
42
trait Test8 {
43
- fn test8 ( a : & Box < Any > ) ;
43
+ fn test8 ( a : & Box < dyn Any > ) ;
44
44
}
45
45
46
46
impl < ' a > Test8 for Test7 < ' a > {
47
- fn test8 ( a : & Box < Any > ) {
47
+ fn test8 ( a : & Box < dyn Any > ) {
48
48
unimplemented ! ( ) ;
49
49
}
50
50
}
51
51
52
- pub fn test9 ( foo : & mut Box < Any + Send + Sync > ) {
52
+ pub fn test9 ( foo : & mut Box < dyn Any + Send + Sync > ) {
53
53
let _ = foo;
54
54
}
55
55
56
56
pub fn test10 ( ) {
57
- let foo: & Box < Any + Send + ' static > ;
57
+ let foo: & Box < dyn Any + Send + ' static > ;
58
58
}
59
59
60
60
struct Test11 < ' a > {
61
- foo : & ' a Box < Any + Send > ,
61
+ foo : & ' a Box < dyn Any + Send > ,
62
62
}
63
63
64
64
trait Test12 {
65
- fn test4 ( a : & Box < Any + ' static > ) ;
65
+ fn test4 ( a : & Box < dyn Any + ' static > ) ;
66
66
}
67
67
68
68
impl < ' a > Test12 for Test11 < ' a > {
69
- fn test4 ( a : & Box < Any + ' static > ) {
69
+ fn test4 ( a : & Box < dyn Any + ' static > ) {
70
70
unimplemented ! ( ) ;
71
71
}
72
72
}
73
73
74
74
fn main ( ) {
75
75
test1 ( & mut Box :: new ( false ) ) ;
76
76
test2 ( ) ;
77
- test5 ( & mut ( Box :: new ( false ) as Box < Any > ) ) ;
77
+ test5 ( & mut ( Box :: new ( false ) as Box < dyn Any > ) ) ;
78
78
test6 ( ) ;
79
- test9 ( & mut ( Box :: new ( false ) as Box < Any + Send + Sync > ) ) ;
79
+ test9 ( & mut ( Box :: new ( false ) as Box < dyn Any + Send + Sync > ) ) ;
80
80
test10 ( ) ;
81
81
}
0 commit comments