MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / free_typevar

Method free_typevar

cranelift/codegen/meta/src/cdsl/typevar.rs:133–144  ·  view source on GitHub ↗

Get the free type variable controlling this one.

(&self)

Source from the content-addressed store, hash-verified

131
132 /// Get the free type variable controlling this one.
133 pub fn free_typevar(&self) -> Option<TypeVar> {
134 match &self.base {
135 Some(base) => base.type_var.free_typevar(),
136 None => {
137 match self.singleton_type() {
138 // A singleton type isn't a proper free variable.
139 Some(_) => None,
140 None => Some(self.clone()),
141 }
142 }
143 }
144 }
145
146 /// Create a type variable that is a function of another.
147 pub fn derived(&self, derived_func: DerivedFunc) -> TypeVar {

Callers 3

get_constraintFunction · 0.80
verify_polymorphicFunction · 0.80

Calls 2

singleton_typeMethod · 0.80
cloneMethod · 0.45

Tested by

no test coverage detected