Document PredicateSet::insert
I always forget what the `bool` means :/
This commit is contained in:
parent
b657dc555b
commit
eabd306265
@ -25,6 +25,13 @@ pub fn new(tcx: TyCtxt<'tcx>) -> Self {
|
|||||||
Self { tcx, set: Default::default() }
|
Self { tcx, set: Default::default() }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Adds a predicate to the set.
|
||||||
|
///
|
||||||
|
/// Returns whether the predicate was newly inserted. That is:
|
||||||
|
/// - If the set did not previously contain this predicate, `true` is returned.
|
||||||
|
/// - If the set already contained this predicate, `false` is returned,
|
||||||
|
/// and the set is not modified: original predicate is not replaced,
|
||||||
|
/// and the predicate passed as argument is dropped.
|
||||||
pub fn insert(&mut self, pred: ty::Predicate<'tcx>) -> bool {
|
pub fn insert(&mut self, pred: ty::Predicate<'tcx>) -> bool {
|
||||||
// We have to be careful here because we want
|
// We have to be careful here because we want
|
||||||
//
|
//
|
||||||
|
Loading…
Reference in New Issue
Block a user