From f8a4b6d2ba2ad2a0897cd26cf6196cca23045f96 Mon Sep 17 00:00:00 2001 From: Christopher Durham Date: Mon, 25 Nov 2019 17:55:26 -0500 Subject: [PATCH] impl TrustedLen for vec::Drain --- src/liballoc/vec.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/liballoc/vec.rs b/src/liballoc/vec.rs index 07e4358d644c6..ab9e2a23cb03e 100644 --- a/src/liballoc/vec.rs +++ b/src/liballoc/vec.rs @@ -2701,6 +2701,9 @@ impl ExactSizeIterator for Drain<'_, T> { } } +#[unstable(feature = "trusted_len", issue = "37572")] +unsafe impl TrustedLen for Drain<'_, T> {} + #[stable(feature = "fused", since = "1.26.0")] impl FusedIterator for Drain<'_, T> {}