From d697dd44d18fbab9a28032d7b1ceba829600637e Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Mon, 4 Mar 2024 16:57:32 +0100 Subject: Add a crate-custom test harness --- compiler/rustc_pattern_analysis/src/lib.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'compiler/rustc_pattern_analysis/src') diff --git a/compiler/rustc_pattern_analysis/src/lib.rs b/compiler/rustc_pattern_analysis/src/lib.rs index 3904959fa0f..1a1da5c55f6 100644 --- a/compiler/rustc_pattern_analysis/src/lib.rs +++ b/compiler/rustc_pattern_analysis/src/lib.rs @@ -49,6 +49,12 @@ pub mod index { } } + impl FromIterator for IdxContainer { + fn from_iter>(iter: T) -> Self { + Self(iter.into_iter().enumerate().collect()) + } + } + #[derive(Debug)] pub struct IdxSet(pub rustc_hash::FxHashSet); impl IdxSet { -- cgit 1.4.1-3-g733a5