Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit a925bdf

Browse files
committed
Add a test for rust-lang#3031 and update test
No combining for an item-like macro argument.
1 parent 1b2e727 commit a925bdf

File tree

3 files changed

+54
-3
lines changed

3 files changed

+54
-3
lines changed

tests/source/macros.rs

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -426,3 +426,29 @@ named!(
426426

427427
// #2857
428428
convert_args!(vec!(1, 2, 3));
429+
430+
// #3031
431+
thread_local!(
432+
/// TLV Holds a set of JSTraceables that need to be rooted
433+
static ROOTED_TRACEABLES: RefCell<RootedTraceableSet> =
434+
RefCell::new(RootedTraceableSet::new()) ;
435+
) ;
436+
437+
thread_local![
438+
/// TLV Holds a set of JSTraceables that need to be rooted
439+
static ROOTED_TRACEABLES: RefCell<RootedTraceableSet> =
440+
RefCell::new(RootedTraceableSet::new()) ;
441+
442+
/// TLV Holds a set of JSTraceables that need to be rooted
443+
static ROOTED_TRACEABLES: RefCell<RootedTraceableSet> =
444+
RefCell::new(RootedTraceableSet::new(0)) ;
445+
446+
/// TLV Holds a set of JSTraceables that need to be rooted
447+
static ROOTED_TRACEABLES: RefCell<RootedTraceableSet> =
448+
RefCell::new(RootedTraceableSet::new(), xxx, yyy) ;
449+
450+
/// TLV Holds a set of JSTraceables that need to be rooted
451+
static ROOTED_TRACEABLES: RefCell<RootedTraceableSet> =
452+
RefCell::new(RootedTraceableSet::new(1234)) ;
453+
454+
] ;

tests/target/issue-2523.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@
1111
// Format items that appear as arguments of macro call.
1212
//! ```rust
1313
//! let x = 3;
14-
//! some_macro!(pub fn foo() {
15-
//! println!("Don't unindent me!");
16-
//! });
14+
//! some_macro!(
15+
//! pub fn foo() {
16+
//! println!("Don't unindent me!");
17+
//! }
18+
//! );
1719
//! ```

tests/target/macros.rs

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1007,3 +1007,26 @@ named!(
10071007

10081008
// #2857
10091009
convert_args!(vec!(1, 2, 3));
1010+
1011+
// #3031
1012+
thread_local!(
1013+
/// TLV Holds a set of JSTraceables that need to be rooted
1014+
static ROOTED_TRACEABLES: RefCell<RootedTraceableSet> = RefCell::new(RootedTraceableSet::new());
1015+
);
1016+
1017+
thread_local![
1018+
/// TLV Holds a set of JSTraceables that need to be rooted
1019+
static ROOTED_TRACEABLES: RefCell<RootedTraceableSet> = RefCell::new(RootedTraceableSet::new());
1020+
1021+
/// TLV Holds a set of JSTraceables that need to be rooted
1022+
static ROOTED_TRACEABLES: RefCell<RootedTraceableSet> =
1023+
RefCell::new(RootedTraceableSet::new(0));
1024+
1025+
/// TLV Holds a set of JSTraceables that need to be rooted
1026+
static ROOTED_TRACEABLES: RefCell<RootedTraceableSet> =
1027+
RefCell::new(RootedTraceableSet::new(), xxx, yyy);
1028+
1029+
/// TLV Holds a set of JSTraceables that need to be rooted
1030+
static ROOTED_TRACEABLES: RefCell<RootedTraceableSet> =
1031+
RefCell::new(RootedTraceableSet::new(1234));
1032+
];

0 commit comments

Comments
 (0)