@@ -26,7 +26,58 @@ pub fn j() -> impl Iterator<Item=u8> + Clone {
2626 Some ( 1u8 ) . into_iter ( )
2727}
2828
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+
2970// @has issue_43869/fn.g.html
3071// @has issue_43869/fn.h.html
3172// @has issue_43869/fn.i.html
3273// @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