Expand description
“Chains” are a canonicalized form of types/permissions. They can only be produced after inference is complete as they require enumerating the bounds of inference variables. They are used in borrow checking and for producing the final version of each inference variable.
Traits§
- RedTy
Ext - ToRed
Chain Vec - Create a
Vec<RedChain>, each of which are a canonical list of permissions. Canonical means that - ToRed
Link Vecs - Convert the permission into a vector of red-links.
- ToRed
Perm - ToRedTy
- Convert something to a
RedTyand an (optional) permission that is applied to thatRedTy.
Functions§
- concat_
linkvecs 🔒 - concat_
linkvecvecs 🔒 - expand_
tail 🔒 - After we’ve done the initial expansion to red links, we may end up with a chain
that ends in something like
mut[p]orref[p]. In that case, we need to find the permissions frompand append them to the chain. This is called “expansion” in the dada-model code. This function expands the tail recursively until there are no more permissions to add and then invokesconsumer.consume. - to_
red_ ty_ with_ runtime - Convert
tyto a red-ty given a runtime.