Skip to main content

Module diagnostic_api

Module diagnostic_api 

Source
Expand description

Standard-library API identities registered as rustc diagnostic items.

A diagnostic item is a definition marked with #[rustc_diagnostic_item = "..."] in the standard library. rustc records its marker name and DefId, allowing callers to recognize the definition without matching its module path.

ยงAgent Rules

Keep this module limited to identifying diagnostic items by DefId. Do not depend on other RAPx modules.

Re-exportsยง

use rustc_hir::def_id::DefId; ๐Ÿ”’
use rustc_middle::ty::TyCtxt; ๐Ÿ”’
use rustc_span::Symbol; ๐Ÿ”’

Functionsยง

is_drop
is_drop_in_place
is_mem_size_or_align_of
Whether did is mem::size_of or mem::align_of.
is_ptr_copy
is_ptr_read
is_ptr_write
is_ptr_write_to_uninit