]> git.lizzy.rs Git - rust.git/blob - tests/target/macros.rs
Trim the indentation on macros which heuristically appear to use block-style indentat...
[rust.git] / tests / target / macros.rs
1 // rustfmt-normalize_comments: true
2 // rustfmt-format_macro_matchers: true
3 itemmacro!(this, is.now().formatted(yay));
4
5 itemmacro!(
6     really,
7     long.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbb()
8         .is
9         .formatted()
10 );
11
12 itemmacro!{this, is.bracket().formatted()}
13
14 peg_file! modname("mygrammarfile.rustpeg");
15
16 fn main() {
17     foo!();
18
19     foo!(,);
20
21     bar!(a, b, c);
22
23     bar!(a, b, c,);
24
25     baz!(1 + 2 + 3, quux.kaas());
26
27     quux!(
28         AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA,
29         BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
30     );
31
32     kaas!(
33         // comments
34         a, // post macro
35         b  // another
36     );
37
38     trailingcomma!(a, b, c,);
39     // Preserve trailing comma only when necessary.
40     ok!(file.seek(SeekFrom::Start(
41         table.map(|table| fixture.offset(table)).unwrap_or(0),
42     )));
43
44     noexpr!( i am not an expression, OK? );
45
46     vec![a, b, c];
47
48     vec![
49         AAAAAA,
50         AAAAAA,
51         AAAAAA,
52         AAAAAA,
53         AAAAAA,
54         AAAAAA,
55         AAAAAA,
56         AAAAAA,
57         AAAAAA,
58         BBBBB,
59         5,
60         100 - 30,
61         1.33,
62         b,
63         b,
64         b,
65     ];
66
67     vec![a /* comment */];
68
69     // Trailing spaces after a comma
70     vec![a];
71
72     vec![a; b];
73     vec![a; b];
74     vec![a; b];
75
76     vec![a, b; c];
77     vec![a; b, c];
78
79     vec![
80         a;
81         (|x| {
82             let y = x + 1;
83             let z = y + 1;
84             z
85         })(2)
86     ];
87     vec![
88         a;
89         xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
90     ];
91     vec![a; unsafe { x + 1 }];
92
93     unknown_bracket_macro__comma_should_not_be_stripped![a,];
94
95     foo(makro!(1, 3));
96
97     hamkaas!{ () };
98
99     macrowithbraces! {dont,    format, me}
100
101     x!(fn);
102
103     some_macro!();
104
105     some_macro![];
106
107     some_macro!{
108         // comment
109     };
110
111     some_macro!{
112         // comment
113     };
114
115     some_macro!(
116         // comment
117         not function like
118     );
119
120     // #1712
121     let image = gray_image!(
122         00, 01, 02;
123         10, 11, 12;
124         20, 21, 22);
125
126     // #1092
127     chain!(input, a: take!(max_size), || []);
128
129     // #2727
130     foo!("bar");
131 }
132
133 impl X {
134     empty_invoc!{}
135 }
136
137 fn issue_1279() {
138     println!("dsfs"); // a comment
139 }
140
141 fn issue_1555() {
142     let hello = &format!(
143         "HTTP/1.1 200 OK\r\nServer: {}\r\n\r\n{}",
144         "65454654654654654654654655464", "4"
145     );
146 }
147
148 fn issue1178() {
149     macro_rules! foo {
150         (#[$attr:meta] $name:ident) => {};
151     }
152
153     foo!(
154         #[doc = "bar"]
155         baz
156     );
157 }
158
159 fn issue1739() {
160     sql_function!(
161         add_rss_item,
162         add_rss_item_t,
163         (
164             a: types::Integer,
165             b: types::Timestamptz,
166             c: types::Text,
167             d: types::Text,
168             e: types::Text
169         )
170     );
171
172     w.slice_mut(s![
173         ..,
174         init_size[1] - extreeeeeeeeeeeeeeeeeeeeeeeem..init_size[1],
175         ..
176     ])
177     .par_map_inplace(|el| *el = 0.);
178 }
179
180 fn issue_1885() {
181     let threads = people
182         .into_iter()
183         .map(|name| {
184             chan_select! {
185                 rx.recv() => {}
186             }
187         })
188         .collect::<Vec<_>>();
189 }
190
191 fn issue_1917() {
192     mod x {
193         quickcheck! {
194             fn test(a: String, s: String, b: String) -> TestResult {
195                 if a.find(&s).is_none() {
196
197                     TestResult::from_bool(true)
198                 } else {
199                     TestResult::discard()
200                 }
201             }
202         }
203     }
204 }
205
206 fn issue_1921() {
207     // Macro with tabs.
208     lazy_static! {
209         static ref ONE: u32 = 1;
210         static ref TWO: u32 = 2;
211         static ref THREE: u32 = 3;
212         static ref FOUR: u32 = {
213             let mut acc = 1;
214             acc += 1;
215             acc += 2;
216             acc
217         };
218     }
219 }
220
221 // #1577
222 fn issue1577() {
223     let json = json!({
224         "foo": "bar",
225     });
226 }
227
228 // #3174
229 fn issue_3174() {
230     let data = if let Some(debug) = error.debug_info() {
231         json!({
232             "errorKind": format!("{:?}", error.err_kind()),
233             "debugMessage": debug.message,
234         })
235     } else {
236         json!({ "errorKind": format!("{:?}", error.err_kind()) })
237     };
238 }
239
240 gfx_pipeline!(pipe {
241     vbuf: gfx::VertexBuffer<Vertex> = (),
242     out: gfx::RenderTarget<ColorFormat> = "Target0",
243 });
244
245 // #1919
246 #[test]
247 fn __bindgen_test_layout_HandleWithDtor_open0_int_close0_instantiation() {
248     assert_eq!(
249         ::std::mem::size_of::<HandleWithDtor<::std::os::raw::c_int>>(),
250         8usize,
251         concat!(
252             "Size of template specialization: ",
253             stringify!(HandleWithDtor<::std::os::raw::c_int>)
254         )
255     );
256     assert_eq!(
257         ::std::mem::align_of::<HandleWithDtor<::std::os::raw::c_int>>(),
258         8usize,
259         concat!(
260             "Alignment of template specialization: ",
261             stringify!(HandleWithDtor<::std::os::raw::c_int>)
262         )
263     );
264 }
265
266 // #878
267 macro_rules! try_opt {
268     ($expr:expr) => {
269         match $expr {
270             Some(val) => val,
271
272             None => {
273                 return None;
274             }
275         }
276     };
277 }
278
279 // #2214
280 // macro call whose argument is an array with trailing comma.
281 fn issue2214() {
282     make_test!(
283         str_searcher_ascii_haystack,
284         "bb",
285         "abbcbbd",
286         [
287             Reject(0, 1),
288             Match(1, 3),
289             Reject(3, 4),
290             Match(4, 6),
291             Reject(6, 7),
292         ]
293     );
294 }
295
296 fn special_case_macros() {
297     let p = eprint!();
298     let q = eprint!("{}", 1);
299     let r = eprint!(
300         "{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}",
301         1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
302     );
303     let s = eprint!(
304         "{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}",
305         1,
306         2,
307         3,
308         4,
309         5,
310         6,
311         7,
312         8,
313         9,
314         10,
315         11,
316         12,
317         13,
318         14,
319         15,
320         16,
321         17,
322         18,
323         19,
324         20,
325         21,
326         22,
327         23,
328         24,
329         25,
330         26
331     );
332
333     let q = eprintln!("{}", 1);
334     let r = eprintln!(
335         "{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}",
336         1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
337     );
338     let s = eprintln!(
339         "{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}",
340         1,
341         2,
342         3,
343         4,
344         5,
345         6,
346         7,
347         8,
348         9,
349         10,
350         11,
351         12,
352         13,
353         14,
354         15,
355         16,
356         17,
357         18,
358         19,
359         20,
360         21,
361         22,
362         23,
363         24,
364         25,
365         26
366     );
367
368     let q = format!("{}", 1);
369     let r = format!(
370         "{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}",
371         1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
372     );
373     let s = format!(
374         "{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}",
375         1,
376         2,
377         3,
378         4,
379         5,
380         6,
381         7,
382         8,
383         9,
384         10,
385         11,
386         12,
387         13,
388         14,
389         15,
390         16,
391         17,
392         18,
393         19,
394         20,
395         21,
396         22,
397         23,
398         24,
399         25,
400         26
401     );
402
403     let q = format_args!("{}", 1);
404     let r = format_args!(
405         "{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}",
406         1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
407     );
408     let s = format_args!(
409         "{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}",
410         1,
411         2,
412         3,
413         4,
414         5,
415         6,
416         7,
417         8,
418         9,
419         10,
420         11,
421         12,
422         13,
423         14,
424         15,
425         16,
426         17,
427         18,
428         19,
429         20,
430         21,
431         22,
432         23,
433         24,
434         25,
435         26
436     );
437
438     let q = print!("{}", 1);
439     let r = print!(
440         "{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}",
441         1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
442     );
443     let s = print!(
444         "{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}",
445         1,
446         2,
447         3,
448         4,
449         5,
450         6,
451         7,
452         8,
453         9,
454         10,
455         11,
456         12,
457         13,
458         14,
459         15,
460         16,
461         17,
462         18,
463         19,
464         20,
465         21,
466         22,
467         23,
468         24,
469         25,
470         26
471     );
472
473     let q = println!("{}", 1);
474     let r = println!(
475         "{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}",
476         1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
477     );
478     let s = println!(
479         "{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}",
480         1,
481         2,
482         3,
483         4,
484         5,
485         6,
486         7,
487         8,
488         9,
489         10,
490         11,
491         12,
492         13,
493         14,
494         15,
495         16,
496         17,
497         18,
498         19,
499         20,
500         21,
501         22,
502         23,
503         24,
504         25,
505         26
506     );
507
508     let q = unreachable!("{}", 1);
509     let r = unreachable!(
510         "{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}",
511         1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
512     );
513     let s = unreachable!(
514         "{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}",
515         1,
516         2,
517         3,
518         4,
519         5,
520         6,
521         7,
522         8,
523         9,
524         10,
525         11,
526         12,
527         13,
528         14,
529         15,
530         16,
531         17,
532         18,
533         19,
534         20,
535         21,
536         22,
537         23,
538         24,
539         25,
540         26
541     );
542
543     debug!("{}", 1);
544     debug!(
545         "{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}",
546         1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
547     );
548     debug!(
549         "{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}",
550         1,
551         2,
552         3,
553         4,
554         5,
555         6,
556         7,
557         8,
558         9,
559         10,
560         11,
561         12,
562         13,
563         14,
564         15,
565         16,
566         17,
567         18,
568         19,
569         20,
570         21,
571         22,
572         23,
573         24,
574         25,
575         26
576     );
577
578     error!("{}", 1);
579     error!(
580         "{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}",
581         1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
582     );
583     error!(
584         "{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}",
585         1,
586         2,
587         3,
588         4,
589         5,
590         6,
591         7,
592         8,
593         9,
594         10,
595         11,
596         12,
597         13,
598         14,
599         15,
600         16,
601         17,
602         18,
603         19,
604         20,
605         21,
606         22,
607         23,
608         24,
609         25,
610         26
611     );
612
613     info!("{}", 1);
614     info!(
615         "{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}",
616         1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
617     );
618     info!(
619         "{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}",
620         1,
621         2,
622         3,
623         4,
624         5,
625         6,
626         7,
627         8,
628         9,
629         10,
630         11,
631         12,
632         13,
633         14,
634         15,
635         16,
636         17,
637         18,
638         19,
639         20,
640         21,
641         22,
642         23,
643         24,
644         25,
645         26
646     );
647
648     panic!("{}", 1);
649     panic!(
650         "{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}",
651         1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
652     );
653     panic!(
654         "{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}",
655         1,
656         2,
657         3,
658         4,
659         5,
660         6,
661         7,
662         8,
663         9,
664         10,
665         11,
666         12,
667         13,
668         14,
669         15,
670         16,
671         17,
672         18,
673         19,
674         20,
675         21,
676         22,
677         23,
678         24,
679         25,
680         26
681     );
682
683     warn!("{}", 1);
684     warn!(
685         "{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}",
686         1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
687     );
688     warn!(
689         "{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}",
690         1,
691         2,
692         3,
693         4,
694         5,
695         6,
696         7,
697         8,
698         9,
699         10,
700         11,
701         12,
702         13,
703         14,
704         15,
705         16,
706         17,
707         18,
708         19,
709         20,
710         21,
711         22,
712         23,
713         24,
714         25,
715         26
716     );
717
718     assert!();
719     assert!(result == 42);
720     assert!(result == 42, "Ahoy there, {}!", target);
721     assert!(
722         result == 42,
723         "Arr! While plunderin' the hold, we got '{}' when given '{}' (we expected '{}')",
724         result,
725         input,
726         expected
727     );
728     assert!(
729         result == 42,
730         "{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}",
731         1,
732         2,
733         3,
734         4,
735         5,
736         6,
737         7,
738         8,
739         9,
740         10,
741         11,
742         12,
743         13,
744         14,
745         15,
746         16,
747         17,
748         18,
749         19,
750         20,
751         21,
752         22,
753         23,
754         24,
755         25,
756         26
757     );
758
759     assert_eq!();
760     assert_eq!(left);
761     assert_eq!(left, right);
762     assert_eq!(left, right, "Ahoy there, {}!", target);
763     assert_eq!(
764         left, right,
765         "Arr! While plunderin' the hold, we got '{}' when given '{}' (we expected '{}')",
766         result, input, expected
767     );
768     assert_eq!(
769         first_realllllllllllly_long_variable_that_doesnt_fit_one_one_line,
770         second_reallllllllllly_long_variable_that_doesnt_fit_one_one_line,
771         "Arr! While plunderin' the hold, we got '{}' when given '{}' (we expected '{}')",
772         result,
773         input,
774         expected
775     );
776     assert_eq!(
777         left + 42,
778         right,
779         "Arr! While plunderin' the hold, we got '{}' when given '{}' (we expected '{}')",
780         result,
781         input,
782         expected
783     );
784     assert_eq!(
785         left,
786         right,
787         "{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}",
788         1,
789         2,
790         3,
791         4,
792         5,
793         6,
794         7,
795         8,
796         9,
797         10,
798         11,
799         12,
800         13,
801         14,
802         15,
803         16,
804         17,
805         18,
806         19,
807         20,
808         21,
809         22,
810         23,
811         24,
812         25,
813         26
814     );
815
816     write!(&mut s, "Ahoy there, {}!", target);
817     write!(
818         &mut s,
819         "Arr! While plunderin' the hold, we got '{}' when given '{}' (we expected '{}')",
820         result, input, expected
821     );
822     write!(
823         &mut s,
824         "{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}",
825         1,
826         2,
827         3,
828         4,
829         5,
830         6,
831         7,
832         8,
833         9,
834         10,
835         11,
836         12,
837         13,
838         14,
839         15,
840         16,
841         17,
842         18,
843         19,
844         20,
845         21,
846         22,
847         23,
848         24,
849         25,
850         26
851     );
852
853     writeln!(&mut s, "Ahoy there, {}!", target);
854     writeln!(
855         &mut s,
856         "Arr! While plunderin' the hold, we got '{}' when given '{}' (we expected '{}')",
857         result, input, expected
858     );
859     writeln!(
860         &mut s,
861         "{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}",
862         1,
863         2,
864         3,
865         4,
866         5,
867         6,
868         7,
869         8,
870         9,
871         10,
872         11,
873         12,
874         13,
875         14,
876         15,
877         16,
878         17,
879         18,
880         19,
881         20,
882         21,
883         22,
884         23,
885         24,
886         25,
887         26
888     );
889 }
890
891 // #1209
892 impl Foo {
893     /// foo
894     pub fn foo(&self) -> Bar<foo!()> {}
895 }
896
897 // #819
898 fn macro_in_pattern_position() {
899     let x = match y {
900         foo!() => (),
901         bar!(a, b, c) => (),
902         bar!(a, b, c,) => (),
903         baz!(1 + 2 + 3, quux.kaas()) => (),
904         quux!(
905             AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA,
906             BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
907         ) => (),
908     };
909 }
910
911 macro foo() {}
912
913 pub macro bar($x:ident + $y:expr;) {
914     fn foo($x: Foo) {
915         long_function(
916             a_long_argument_to_a_long_function_is_what_this_is(AAAAAAAAAAAAAAAAAAAAAAAAAAAA),
917             $x.bar($y),
918         );
919     }
920 }
921
922 macro foo() {
923     // a comment
924     fn foo() {
925         // another comment
926         bar();
927     }
928 }
929
930 // #2574
931 macro_rules! test {
932     () => {{}};
933 }
934
935 macro lex_err($kind: ident $(, $body: expr)*) {
936     Err(QlError::LexError(LexError::$kind($($body,)*)))
937 }
938
939 // Preserve trailing comma on item-level macro with `()` or `[]`.
940 methods![get, post, delete,];
941 methods!(get, post, delete,);
942
943 // #2588
944 macro_rules! m {
945     () => {
946         r#"
947             test
948         "#
949     };
950 }
951 fn foo() {
952     f!{r#"
953             test
954        "#};
955 }
956
957 // #2591
958 fn foo() {
959     match 0u32 {
960         0 => (),
961         _ => unreachable!(/* obviously */),
962     }
963 }
964
965 fn foo() {
966     let _ = column!(/* here */);
967 }
968
969 // #2616
970 // Preserve trailing comma when using mixed layout for macro call.
971 fn foo() {
972     foo!(
973         1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
974         1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
975     );
976     foo!(
977         1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
978         1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
979     );
980 }
981
982 // #2652
983 // Preserve trailing comma inside macro, even if it looks an array.
984 macro_rules! bar {
985     ($m:ident) => {
986         $m!([a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z]);
987     };
988 }
989
990 // #2830
991 // Preserve trailing comma-less/ness inside nested macro.
992 named!(
993     do_parse_gsv<GsvData>,
994     map_res!(
995         do_parse!(
996             number_of_sentences: map_res!(digit, parse_num::<u16>)
997                 >> char!(',')
998                 >> sentence_index: map_res!(digit, parse_num::<u16>)
999                 >> char!(',')
1000                 >> total_number_of_sats: map_res!(digit, parse_num::<u16>)
1001                 >> char!(',')
1002                 >> sat0: opt!(complete!(parse_gsv_sat_info))
1003                 >> sat1: opt!(complete!(parse_gsv_sat_info))
1004                 >> sat2: opt!(complete!(parse_gsv_sat_info))
1005                 >> sat3: opt!(complete!(parse_gsv_sat_info))
1006                 >> (
1007                     number_of_sentences,
1008                     sentence_index,
1009                     total_number_of_sats,
1010                     sat0,
1011                     sat1,
1012                     sat2,
1013                     sat3
1014                 )
1015         ),
1016         construct_gsv_data
1017     )
1018 );
1019
1020 // #2857
1021 convert_args!(vec!(1, 2, 3));
1022
1023 // #3031
1024 thread_local!(
1025     /// TLV Holds a set of JSTraceables that need to be rooted
1026     static ROOTED_TRACEABLES: RefCell<RootedTraceableSet> = RefCell::new(RootedTraceableSet::new());
1027 );
1028
1029 thread_local![
1030     /// TLV Holds a set of JSTraceables that need to be rooted
1031     static ROOTED_TRACEABLES: RefCell<RootedTraceableSet> = RefCell::new(RootedTraceableSet::new());
1032
1033     /// TLV Holds a set of JSTraceables that need to be rooted
1034     static ROOTED_TRACEABLES: RefCell<RootedTraceableSet> =
1035         RefCell::new(RootedTraceableSet::new(0));
1036
1037     /// TLV Holds a set of JSTraceables that need to be rooted
1038     static ROOTED_TRACEABLES: RefCell<RootedTraceableSet> =
1039         RefCell::new(RootedTraceableSet::new(), xxx, yyy);
1040
1041     /// TLV Holds a set of JSTraceables that need to be rooted
1042     static ROOTED_TRACEABLES: RefCell<RootedTraceableSet> =
1043         RefCell::new(RootedTraceableSet::new(1234));
1044 ];