@@ -26,7 +26,58 @@ pub fn j() -> impl Iterator<Item=u8> + Clone {
26
26
Some ( 1u8 ) . into_iter ( )
27
27
}
28
28
29
+ pub fn k ( ) -> [ impl Clone ; 2 ] {
30
+ [ 123u32 , 456u32 ]
31
+ }
32
+
33
+ pub fn l ( ) -> ( impl Clone , impl Default ) {
34
+ ( 789u32 , -123i32 )
35
+ }
36
+
37
+ pub fn m ( ) -> & ' static impl Clone {
38
+ & 1u8
39
+ }
40
+
41
+ pub fn n ( ) -> * const impl Clone {
42
+ & 1u8
43
+ }
44
+
45
+ pub fn o ( ) -> & ' static [ impl Clone ] {
46
+ b":)"
47
+ }
48
+
49
+ // issue #44731
50
+ pub fn test_44731_0 ( ) -> Box < impl Iterator < Item =u8 > > {
51
+ Box :: new ( g ( ) )
52
+ }
53
+
54
+ pub fn test_44731_1 ( ) -> Result < Box < impl Clone > , ( ) > {
55
+ Ok ( Box :: new ( j ( ) ) )
56
+ }
57
+
58
+ pub fn test_44731_2 ( ) -> Box < Fn ( impl Clone ) > {
59
+ Box :: new ( |_: u32 | { } )
60
+ }
61
+
62
+ pub fn test_44731_3 ( ) -> Box < Fn ( ) -> impl Clone > {
63
+ Box :: new ( || 0u32 )
64
+ }
65
+
66
+ pub fn test_44731_4 ( ) -> Box < Iterator < Item =impl Clone > > {
67
+ Box :: new ( g ( ) )
68
+ }
69
+
29
70
// @has issue_43869/fn.g.html
30
71
// @has issue_43869/fn.h.html
31
72
// @has issue_43869/fn.i.html
32
73
// @has issue_43869/fn.j.html
74
+ // @has issue_43869/fn.k.html
75
+ // @has issue_43869/fn.l.html
76
+ // @has issue_43869/fn.m.html
77
+ // @has issue_43869/fn.n.html
78
+ // @has issue_43869/fn.o.html
79
+ // @has issue_43869/fn.test_44731_0.html
80
+ // @has issue_43869/fn.test_44731_1.html
81
+ // @has issue_43869/fn.test_44731_2.html
82
+ // @has issue_43869/fn.test_44731_3.html
83
+ // @has issue_43869/fn.test_44731_4.html
0 commit comments