about summary refs log tree commit diff
path: root/library/proc_macro/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-07-25 22:57:23 +0000
committerbors <bors@rust-lang.org>2022-07-25 22:57:23 +0000
commita86705942c4cfaaee60f2e7308ca2bca703a710f (patch)
tree133bd48f82d214929324a7e2337871b505adb8e5 /library/proc_macro/src
parent6dbae3ad19309bb541d9e76638e6aa4b5449f29a (diff)
parente58bfacd90bea9fab8bdbd9cf6129290937fed63 (diff)
downloadrust-a86705942c4cfaaee60f2e7308ca2bca703a710f.tar.gz
rust-a86705942c4cfaaee60f2e7308ca2bca703a710f.zip
Auto merge of #99735 - JohnTitor:rollup-d93jyr2, r=JohnTitor
Rollup of 9 pull requests

Successful merges:

 - #92390 (Constify a few `(Partial)Ord` impls)
 - #97077 (Simplify some code that depend on Deref)
 - #98710 (correct the output of a `capacity` method example)
 - #99084 (clarify how write_bytes can lead to UB due to invalid values)
 - #99178 (Lighten up const_prop_lint, reusing const_prop)
 - #99673 (don't ICE on invalid dyn calls)
 - #99703 (Expose size_hint() for TokenStream's iterator)
 - #99709 (`Inherited` always has `TypeckResults` available)
 - #99713 (Fix sidebar background)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'library/proc_macro/src')
-rw-r--r--library/proc_macro/src/lib.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/library/proc_macro/src/lib.rs b/library/proc_macro/src/lib.rs
index 08b45ac11a1..8e478cd7bc8 100644
--- a/library/proc_macro/src/lib.rs
+++ b/library/proc_macro/src/lib.rs
@@ -382,6 +382,14 @@ pub mod token_stream {
                 bridge::TokenTree::Literal(tt) => TokenTree::Literal(Literal(tt)),
             })
         }
+
+        fn size_hint(&self) -> (usize, Option<usize>) {
+            self.0.size_hint()
+        }
+
+        fn count(self) -> usize {
+            self.0.count()
+        }
     }
 
     #[stable(feature = "proc_macro_lib2", since = "1.29.0")]