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