From 21fb4ac0fb8341f490b094253d4c3649623d07e2 Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Thu, 10 Mar 2022 17:09:33 +1100 Subject: [PATCH] Remove two useless rules from `extension_trait!`. They never run because they are subsumed by the two rules immediately above. --- src/utils.rs | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/utils.rs b/src/utils.rs index d8052444..a54d2525 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -309,14 +309,6 @@ macro_rules! extension_trait { extension_trait!(@ext ($($head)* -> $f) $($tail)*); }; - // Parse the return type in an extension method. - (@doc ($($head:tt)*) -> impl Future + $lt:lifetime [$f:ty] $($tail:tt)*) => { - extension_trait!(@doc ($($head)* -> borrowed::ImplFuture<$lt, $out>) $($tail)*); - }; - (@ext ($($head:tt)*) -> impl Future + $lt:lifetime [$f:ty] $($tail:tt)*) => { - extension_trait!(@ext ($($head)* -> $f) $($tail)*); - }; - // Parse a token. (@doc ($($head:tt)*) $token:tt $($tail:tt)*) => { extension_trait!(@doc ($($head)* $token) $($tail)*);