]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_trait_selection/src/solve/search_graph/mod.rs
remove assembly context and impl a bit more
[rust.git] / compiler / rustc_trait_selection / src / solve / search_graph / mod.rs
index 8d2a3a9cd818e05588454d76cf0d58950e335685..4f48389410bfac28654b97a0e0ee5250f152b9ee 100644 (file)
@@ -36,6 +36,12 @@ pub(super) fn new(tcx: TyCtxt<'tcx>) -> SearchGraph<'tcx> {
         }
     }
 
+    pub(super) fn is_empty(&self) -> bool {
+        self.stack.is_empty()
+            && self.provisional_cache.is_empty()
+            && !self.overflow_data.did_overflow()
+    }
+
     /// Tries putting the new goal on the stack, returning an error if it is already cached.
     ///
     /// This correctly updates the provisional cache if there is a cycle.