From 34d3885168af0596b1a39f2561f95f7458bf5682 Mon Sep 17 00:00:00 2001 From: Andrew Lygin Date: Sat, 14 May 2022 14:38:50 +0300 Subject: [PATCH 1/2] Remove unused macro rules --- crossbeam-channel/tests/golang.rs | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/crossbeam-channel/tests/golang.rs b/crossbeam-channel/tests/golang.rs index 05d67f683..9f8982d65 100644 --- a/crossbeam-channel/tests/golang.rs +++ b/crossbeam-channel/tests/golang.rs @@ -199,14 +199,6 @@ macro_rules! defer { } macro_rules! go { - (@parse ref $v:ident, $($tail:tt)*) => {{ - let ref $v = $v; - go!(@parse $($tail)*) - }}; - (@parse move $v:ident, $($tail:tt)*) => {{ - let $v = $v; - go!(@parse $($tail)*) - }}; (@parse $v:ident, $($tail:tt)*) => {{ let $v = $v.clone(); go!(@parse $($tail)*) @@ -222,9 +214,6 @@ macro_rules! go { } }) }; - (@parse $($tail:tt)*) => { - compile_error!("invalid `go!` syntax") - }; ($($tail:tt)*) => {{ go!(@parse $($tail)*) }}; From c8c1c837f2603e1e9edeea305a5b2a47b985bb58 Mon Sep 17 00:00:00 2001 From: Andrew Lygin Date: Mon, 16 May 2022 19:17:51 +0300 Subject: [PATCH 2/2] Put back macro rule for checking syntax --- crossbeam-channel/tests/golang.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/crossbeam-channel/tests/golang.rs b/crossbeam-channel/tests/golang.rs index 9f8982d65..7016b3aeb 100644 --- a/crossbeam-channel/tests/golang.rs +++ b/crossbeam-channel/tests/golang.rs @@ -214,6 +214,9 @@ macro_rules! go { } }) }; + (@parse $($tail:tt)*) => { + compile_error!("invalid `go!` syntax") + }; ($($tail:tt)*) => {{ go!(@parse $($tail)*) }};