about summary refs log tree commit diff
path: root/compiler/rustc_infer/src/infer/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/rustc_infer/src/infer/mod.rs')
-rw-r--r--compiler/rustc_infer/src/infer/mod.rs10
1 files changed, 6 insertions, 4 deletions
diff --git a/compiler/rustc_infer/src/infer/mod.rs b/compiler/rustc_infer/src/infer/mod.rs
index bc813305ba4..7ef714475fc 100644
--- a/compiler/rustc_infer/src/infer/mod.rs
+++ b/compiler/rustc_infer/src/infer/mod.rs
@@ -50,7 +50,9 @@ use tracing::{debug, instrument};
 use type_variable::TypeVariableOrigin;
 
 use crate::infer::region_constraints::UndoLog;
-use crate::traits::{self, ObligationCause, ObligationInspector, PredicateObligation, TraitEngine};
+use crate::traits::{
+    self, ObligationCause, ObligationInspector, PredicateObligations, TraitEngine,
+};
 
 pub mod at;
 pub mod canonical;
@@ -68,7 +70,7 @@ pub(crate) mod snapshot;
 mod type_variable;
 
 /// `InferOk<'tcx, ()>` is used a lot. It may seem like a useless wrapper
-/// around `Vec<PredicateObligation<'tcx>>`, but it has one important property:
+/// around `PredicateObligations<'tcx>`, but it has one important property:
 /// because `InferOk` is marked with `#[must_use]`, if you have a method
 /// `InferCtxt::f` that returns `InferResult<'tcx, ()>` and you call it with
 /// `infcx.f()?;` you'll get a warning about the obligations being discarded
@@ -78,7 +80,7 @@ mod type_variable;
 #[derive(Debug)]
 pub struct InferOk<'tcx, T> {
     pub value: T,
-    pub obligations: Vec<PredicateObligation<'tcx>>,
+    pub obligations: PredicateObligations<'tcx>,
 }
 pub type InferResult<'tcx, T> = Result<InferOk<'tcx, T>, TypeError<'tcx>>;
 
@@ -658,7 +660,7 @@ impl<'tcx, T> InferOk<'tcx, T> {
 }
 
 impl<'tcx> InferOk<'tcx, ()> {
-    pub fn into_obligations(self) -> Vec<PredicateObligation<'tcx>> {
+    pub fn into_obligations(self) -> PredicateObligations<'tcx> {
         self.obligations
     }
 }