From 8465daf9825a380d3109ecf9fd79945f5e9b367a Mon Sep 17 00:00:00 2001 From: John Kåre Alsaker Date: Sun, 16 Jun 2019 01:32:38 +0200 Subject: Check for local types in writeback with debug assertions --- src/librustc_data_structures/transitive_relation.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/librustc_data_structures') diff --git a/src/librustc_data_structures/transitive_relation.rs b/src/librustc_data_structures/transitive_relation.rs index 0974607fabe..d7cbd1e2e4b 100644 --- a/src/librustc_data_structures/transitive_relation.rs +++ b/src/librustc_data_structures/transitive_relation.rs @@ -58,6 +58,10 @@ impl TransitiveRelation { self.edges.is_empty() } + pub fn elements(&self) -> impl Iterator { + self.elements.iter() + } + fn index(&self, a: &T) -> Option { self.map.get(a).cloned() } -- cgit 1.4.1-3-g733a5