rustc_lint

Module types

Source

Modules§

Structs§

Enums§

Statics§

Functions§

  • 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.
  • A type is niche-optimization candidate iff:
  • lint_nan 🔒
  • 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 None. 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.
  • Is type known to be non-null?