Skip to content

Commit 35c97f8

Browse files
committed
Update doc comment for the known_subset relation
1 parent bfdc6bb commit 35c97f8

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

polonius-engine/src/facts.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,13 @@ pub struct AllFacts<T: FactTypes> {
6363
/// `point`. The same logic as for `initialized_at` and `moved_out_at` applies.
6464
pub path_accessed_at: Vec<(T::Path, T::Point)>,
6565

66-
/// `known_subset(origin1, origin2)` when the "placeholder" `origin1` is a known subset
67-
/// of placeholder `origin2`.
66+
/// These reflect the `'a: 'b` relations that are either declared by the user on function
67+
/// declarations or which are inferred via implied bounds.
68+
/// For example: `fn foo<'a, 'b: 'a, 'c>(x: &'c &'a u32)` would have two entries:
69+
/// - one for the user-supplied subset `'b: 'a`
70+
/// - and one for the `'a: 'c` implied bound from the `x` parameter,
71+
/// (note that the transitive relation `'b: 'c` is not necessarily included
72+
/// explicitly, but rather inferred by polonius).
6873
pub known_subset: Vec<(T::Origin, T::Origin)>,
6974

7075
/// `placeholder(origin, loan)` describes a placeholder `origin`, with its associated

0 commit comments

Comments
 (0)