diff options
| author | John Kåre Alsaker <john.kare.alsaker@gmail.com> | 2019-06-16 01:32:38 +0200 |
|---|---|---|
| committer | John Kåre Alsaker <john.kare.alsaker@gmail.com> | 2019-06-26 13:04:06 +0200 |
| commit | 8465daf9825a380d3109ecf9fd79945f5e9b367a (patch) | |
| tree | d5ce81a612ae8a39ecd9e7a24f59def01101f147 /src/librustc_data_structures | |
| parent | c9325181d673445151ac3625dafb1869973fdd1c (diff) | |
| download | rust-8465daf9825a380d3109ecf9fd79945f5e9b367a.tar.gz rust-8465daf9825a380d3109ecf9fd79945f5e9b367a.zip | |
Check for local types in writeback with debug assertions
Diffstat (limited to 'src/librustc_data_structures')
| -rw-r--r-- | src/librustc_data_structures/transitive_relation.rs | 4 |
1 files changed, 4 insertions, 0 deletions
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<T: Clone + Debug + Eq + Hash> TransitiveRelation<T> { self.edges.is_empty() } + pub fn elements(&self) -> impl Iterator<Item=&T> { + self.elements.iter() + } + fn index(&self, a: &T) -> Option<Index> { self.map.get(a).cloned() } |
