Functions

check_abi 🔒
check_enum 🔒
check_fn 🔒

Helper used for fns and closures. Does the grungy work of checking a function body and returns the function context used for that purpose, since in the case of a fn item there is still a bit more to do.

Checks that an opaque type does not contain cycles and does not use Self or T::Foo projections that would result in “inheriting lifetimes”.

Checks that an opaque type does not contain cycles.

Checks that an opaque type does not use Self or T::Foo projections that would result in “inheriting lifetimes”.

Check that the concrete type behind impl Trait actually implements Trait.

Checks whether a type can be represented in memory. In particular, it identifies types that contain themselves without indirection through a pointer, which would mean their size is unbounded.

Check that a static is inhabited.

Check that the fields of the union do not need dropping.

In the case that a discriminant is both a duplicate and an overflowing literal, we insert both the assigned discriminant and the literal it overflowed from into the formatted output. Otherwise we format the discriminant normally.

Emit an error for recursive opaque types.