about summary refs log tree commit diff
path: root/src/librustc_data_structures
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2019-07-02 08:09:15 +0000
committerbors <bors@rust-lang.org>2019-07-02 08:09:15 +0000
commitef064d2f66bf5851e1da1a016627ff1395f6c9ad (patch)
tree559dae0e8f999c3e1ae5bff445ad4f352eae4fe7 /src/librustc_data_structures
parent99abdfa0b515431133cb38d164e794a51ab58e36 (diff)
parent8465daf9825a380d3109ecf9fd79945f5e9b367a (diff)
downloadrust-ef064d2f66bf5851e1da1a016627ff1395f6c9ad.tar.gz
rust-ef064d2f66bf5851e1da1a016627ff1395f6c9ad.zip
Auto merge of #61871 - Zoxc:no-lift-branch, r=eddyb
Don't use lift to detect local types

This overlaps with https://github.com/rust-lang/rust/pull/61392.

r? @eddyb
Diffstat (limited to 'src/librustc_data_structures')
-rw-r--r--src/librustc_data_structures/transitive_relation.rs4
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()
     }