Skip to main content

Module diagnostic_items

Module diagnostic_items 

Source
Expand description

Detecting diagnostic items.

Diagnostic items are items that are not language-inherent, but can reasonably be expected to exist for diagnostic purposes. This allows diagnostic authors to refer to specific items directly, without having to guess module paths and crates. Examples are:

  • Traits like Debug, that have no bearing on language semantics

  • Compiler internal types like Ty and TyCtxt

Re-exportsยง

use rustc_attr_ir::diagnostic_items::DiagnosticItems; ๐Ÿ”’
use rustc_attr_ir::find_attr; ๐Ÿ”’
use rustc_hir::CRATE_OWNER_ID; ๐Ÿ”’
use rustc_hir::OwnerId; ๐Ÿ”’
use rustc_middle::query::LocalCrate; ๐Ÿ”’
use rustc_middle::query::Providers; ๐Ÿ”’
use rustc_middle::ty::TyCtxt; ๐Ÿ”’
use rustc_span::def_id::DefId; ๐Ÿ”’
use rustc_span::def_id::LOCAL_CRATE; ๐Ÿ”’
use rustc_span::Symbol; ๐Ÿ”’
use rustc_span::sym; ๐Ÿ”’
use crate::diagnostics::DuplicateDiagnosticItemInCrate; ๐Ÿ”’

Functionsยง

all_diagnostic_items ๐Ÿ”’
Traverse and collect all the diagnostic items in all crates.
collect_item ๐Ÿ”’
diagnostic_items ๐Ÿ”’
Traverse and collect the diagnostic items in the current crate
observe_item ๐Ÿ”’
provide ๐Ÿ”’
report_duplicate_item ๐Ÿ”’