@@ -12,16 +12,16 @@ pub fn main() {
12
12
let _: Box < [ isize ] > = Box :: new ( { [ 1 , 2 , 3 ] } ) ;
13
13
let _: Box < [ isize ] > = Box :: new ( if true { [ 1 , 2 , 3 ] } else { [ 1 , 3 , 4 ] } ) ;
14
14
let _: Box < [ isize ] > = Box :: new ( match true { true => [ 1 , 2 , 3 ] , false => [ 1 , 3 , 4 ] } ) ;
15
- let _: Box < Fn ( isize ) -> _ > = Box :: new ( { |x| ( x as u8 ) } ) ;
16
- let _: Box < Debug > = Box :: new ( if true { false } else { true } ) ;
17
- let _: Box < Debug > = Box :: new ( match true { true => 'a' , false => 'b' } ) ;
15
+ let _: Box < dyn Fn ( isize ) -> _ > = Box :: new ( { |x| ( x as u8 ) } ) ;
16
+ let _: Box < dyn Debug > = Box :: new ( if true { false } else { true } ) ;
17
+ let _: Box < dyn Debug > = Box :: new ( match true { true => 'a' , false => 'b' } ) ;
18
18
19
19
let _: & [ isize ] = & { [ 1 , 2 , 3 ] } ;
20
20
let _: & [ isize ] = & if true { [ 1 , 2 , 3 ] } else { [ 1 , 3 , 4 ] } ;
21
21
let _: & [ isize ] = & match true { true => [ 1 , 2 , 3 ] , false => [ 1 , 3 , 4 ] } ;
22
- let _: & Fn ( isize ) -> _ = & { |x| ( x as u8 ) } ;
23
- let _: & Debug = & if true { false } else { true } ;
24
- let _: & Debug = & match true { true => 'a' , false => 'b' } ;
22
+ let _: & dyn Fn ( isize ) -> _ = & { |x| ( x as u8 ) } ;
23
+ let _: & dyn Debug = & if true { false } else { true } ;
24
+ let _: & dyn Debug = & match true { true => 'a' , false => 'b' } ;
25
25
26
26
let _: & str = & { String :: new ( ) } ;
27
27
let _: & str = & if true { String :: from ( "..." ) } else { 5 . to_string ( ) } ;
@@ -31,12 +31,12 @@ pub fn main() {
31
31
} ;
32
32
33
33
let _: Box < [ isize ] > = Box :: new ( [ 1 , 2 , 3 ] ) ;
34
- let _: Box < Fn ( isize ) -> _ > = Box :: new ( |x| ( x as u8 ) ) ;
34
+ let _: Box < dyn Fn ( isize ) -> _ > = Box :: new ( |x| ( x as u8 ) ) ;
35
35
36
36
let _: Rc < RefCell < [ isize ] > > = Rc :: new ( RefCell :: new ( [ 1 , 2 , 3 ] ) ) ;
37
- let _: Rc < RefCell < FnMut ( isize ) -> _ > > = Rc :: new ( RefCell :: new ( |x| ( x as u8 ) ) ) ;
37
+ let _: Rc < RefCell < dyn FnMut ( isize ) -> _ > > = Rc :: new ( RefCell :: new ( |x| ( x as u8 ) ) ) ;
38
38
39
- let _: Vec < Box < Fn ( isize ) -> _ > > = vec ! [
39
+ let _: Vec < Box < dyn Fn ( isize ) -> _ > > = vec ! [
40
40
Box :: new( |x| ( x as u8 ) ) ,
41
41
Box :: new( |x| ( x as i16 as u8 ) ) ,
42
42
] ;
0 commit comments