Modules§
- improper_
ctypes π - literal π
Structs§
- CTypes
Visitor πState Accumulator for recursive ffi type checking - Type
Limits π
Enums§
- CItem
Kind π - Comparison
Op π - FfiResult π
- Type
Sizedness πDetermine if a type is sized or not, and wether it affects references/pointers/boxes to it
Statics§
- The
ambiguous_wide_pointer_comparisons
lint checks comparison of*const/*mut ?Sized
as the operands. - IMPROPER_
CTYPES πTheimproper_ctypes
lint detects incorrect use of types in foreign modules. - The
improper_ctypes_definitions
lint detects incorrect use ofextern
function definitions. - The
invalid_atomic_ordering
lint detects passing anOrdering
to an atomic operation that does not support that ordering. - The
invalid_nan_comparisons
lint checks comparison withf32::NAN
orf64::NAN
as one of the operand. - OVERFLOWING_
LITERALS πTheoverflowing_literals
lint detects literal out of range for its type. - The
unpredictable_function_pointer_comparisons
lint checks comparison of function pointer as the operands. - UNUSED_
COMPARISONS πTheunused_comparisons
lint detects comparisons made useless by limits of the types involved. - The
variant_size_differences
lint detects enums with widely varying variant sizes.
Functions§
- get_
nullable_ πtype Given a non-null scalar (or transparent) typety
, return the nullable version of that type. If the type passed in was not scalar, returns None. - get_
type_ πsizedness Is this type unsized because it contains (or is) a foreign type? (Returns Err if the type happens to be sized after all) - A type is niche-optimization candidate iff:
- lint_
fn_ πpointer - lint_
nan π - lint_
wide_ πpointer - repr_
nullable_ πptr Check if this enum can be safely exported based on the βnullable pointer optimizationβ. If it can, return the type thatty
can be safely converted to, otherwise returnNone
. Currently restricted to function pointers, boxes, references,core::num::NonZero
,core::ptr::NonNull
, and#[repr(transparent)]
newtypes. repr(transparent)
structs can have a single non-1-ZST field, this function returns that field.- ty_
is_ πknown_ nonnull Is type known to be non-null?