.formatted()
);
-itemmacro!{this, is.bracket().formatted()}
-
-peg_file! modname("mygrammarfile.rustpeg");
+itemmacro! {this, is.brace().formatted()}
fn main() {
foo!();
foo(makro!(1, 3));
- hamkaas!{ () };
+ hamkaas! { () };
macrowithbraces! {dont, format, me}
some_macro![];
- some_macro!{
+ some_macro! {
// comment
};
- some_macro!{
+ some_macro! {
// comment
};
}
impl X {
- empty_invoc!{}
+ empty_invoc! {}
+ empty_invoc! {}
}
fn issue_1279() {
});
}
+// #3174
+fn issue_3174() {
+ let data = if let Some(debug) = error.debug_info() {
+ json!({
+ "errorKind": format!("{:?}", error.err_kind()),
+ "debugMessage": debug.message,
+ })
+ } else {
+ json!({ "errorKind": format!("{:?}", error.err_kind()) })
+ };
+}
+
gfx_pipeline!(pipe {
vbuf: gfx::VertexBuffer<Vertex> = (),
out: gfx::RenderTarget<ColorFormat> = "Target0",
};
}
fn foo() {
- f!{r#"
+ f! {r#"
test
"#};
}
);
}
-// #2652
-// Preserve trailing comma inside macro, even if it looks an array.
-macro_rules! bar {
- ($m:ident) => {
- $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]);
- };
-}
-
// #2830
// Preserve trailing comma-less/ness inside nested macro.
named!(
// #2857
convert_args!(vec!(1, 2, 3));
+
+// #3031
+thread_local!(
+ /// TLV Holds a set of JSTraceables that need to be rooted
+ static ROOTED_TRACEABLES: RefCell<RootedTraceableSet> = RefCell::new(RootedTraceableSet::new());
+);
+
+thread_local![
+ /// TLV Holds a set of JSTraceables that need to be rooted
+ static ROOTED_TRACEABLES: RefCell<RootedTraceableSet> = RefCell::new(RootedTraceableSet::new());
+
+ /// TLV Holds a set of JSTraceables that need to be rooted
+ static ROOTED_TRACEABLES: RefCell<RootedTraceableSet> =
+ RefCell::new(RootedTraceableSet::new(0));
+
+ /// TLV Holds a set of JSTraceables that need to be rooted
+ static ROOTED_TRACEABLES: RefCell<RootedTraceableSet> =
+ RefCell::new(RootedTraceableSet::new(), xxx, yyy);
+
+ /// TLV Holds a set of JSTraceables that need to be rooted
+ static ROOTED_TRACEABLES: RefCell<RootedTraceableSet> =
+ RefCell::new(RootedTraceableSet::new(1234));
+];
+
+fn issue3004() {
+ foo!(|_| { () });
+ stringify!((foo+));
+}
+
+// #3331
+pub fn fold_abi<V: Fold + ?Sized>(_visitor: &mut V, _i: Abi) -> Abi {
+ Abi {
+ extern_token: Token![extern](tokens_helper(_visitor, &_i.extern_token.span)),
+ name: (_i.name).map(|it| _visitor.fold_lit_str(it)),
+ }
+}
+
+// #3463
+x! {()}
+
+// #3746
+f!(match a {
+ 4 => &[
+ (3, false), // Missing
+ (4, true) // I-frame
+ ][..],
+});
+
+// #3583
+foo!(|x = y|);