We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
PredicateSet::insert
1 parent b657dc5 commit eabd306Copy full SHA for eabd306
compiler/rustc_infer/src/traits/util.rs
@@ -25,6 +25,13 @@ impl<'tcx> PredicateSet<'tcx> {
25
Self { tcx, set: Default::default() }
26
}
27
28
+ /// Adds a predicate to the set.
29
+ ///
30
+ /// Returns whether the predicate was newly inserted. That is:
31
+ /// - If the set did not previously contain this predicate, `true` is returned.
32
+ /// - If the set already contained this predicate, `false` is returned,
33
+ /// and the set is not modified: original predicate is not replaced,
34
+ /// and the predicate passed as argument is dropped.
35
pub fn insert(&mut self, pred: ty::Predicate<'tcx>) -> bool {
36
// We have to be careful here because we want
37
//
0 commit comments