Skip to main content

Module to_red

Module to_red 

Source
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§

RedTyExt
ToRedChainVec
Create a Vec<RedChain>, each of which are a canonical list of permissions. Canonical means that
ToRedLinkVecs
Convert the permission into a vector of red-links.
ToRedPerm
ToRedTy
Convert something to a RedTy and an (optional) permission that is applied to that RedTy.

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] or ref[p]. In that case, we need to find the permissions from p and 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 invokes consumer.consume.
to_red_ty_with_runtime
Convert ty to a red-ty given a runtime.