improper_ctypes lint detects incorrect use of types in foreign
improper_ctypes_definitions lint detects incorrect use of
extern function definitions.
invalid_atomic_ordering lint detects passing an
to an atomic operation that does not support that ordering.
overflowing_literals lint detects literal out of range for its
unused_comparisons lint detects comparisons made useless by
limits of the types involved.
variant_size_differences lint detects enums with widely varying
Given a non-null scalar (or transparent) type
ty, return the nullable version of that type.
If the type passed in was not scalar, returns None.
Attempts to special-case the overflowing literal lint when it occurs as a range endpoint.
true iff the lint was overridden.
Check if this enum can be safely exported based on the “nullable pointer optimization”. If it
can, return the type that
ty can be safely converted to, otherwise return
Currently restricted to function pointers, boxes, references,
FIXME: This duplicates code in codegen.
repr(transparent) structs can have a single non-ZST field, this function returns that
Is type known to be non-null?