Skip to main content

Module crate_index

Module crate_index 

Source
Expand description

Shared crate index built from a single parse pass over all source files.

All lint rules operate on this index rather than re-parsing files.

Structsยง

AttributedTraitImpl
CrateIndex
Shared parsed state for all lint rules.
FileData
ImplMethodEntry
Per-method data collected during the crate-index pass for impl-method lint rules.
LintItem

Enumsยง

LintKind
MethodReceiverKind
Receiver kind for an impl method, mirroring ReceiverKind in miniextendr-macros.

Constantsยง

RF_ERROR_PATTERNS ๐Ÿ”’
Patterns that indicate direct Rf_error/Rf_errorcall calls in user code.

Functionsยง

collect_active_cargo_features ๐Ÿ”’
Collect the set of active Cargo features from CARGO_FEATURE_* env vars. Feature names are normalized: CARGO_FEATURE_FOO_BAR โ†’ "foo-bar".
collect_items_recursive ๐Ÿ”’
Recursively collect all lint-relevant information from parsed items.
collect_rs_files_from_module_tree ๐Ÿ”’
Collect Rust source files by walking the module tree from lib.rs, following mod child; declarations and respecting #[cfg(feature = "...")] gates via CARGO_FEATURE_* environment variables.
detect_receiver_kind ๐Ÿ”’
Detect the receiver kind from a method signature.
discover_mod_declarations ๐Ÿ”’
Walk parsed items looking for mod child; declarations and recurse.
eval_cfg_str ๐Ÿ”’
Try to evaluate a single cfg string like cfg(feature = "foo").
extract_feature_name ๐Ÿ”’
Extract the feature name from a string like feature="foo".
extract_param_names ๐Ÿ”’
Extract named parameter names (and their 1-based line numbers) from a function signature.
extract_return_type_str ๐Ÿ”’
Stringify a syn::ReturnType to a compact token string.
find_interleaved_doc_attr ๐Ÿ”’
Returns the 1-based line number of the first non-doc attribute that interrupts a doc-comment stream, or None if no such interruption exists.
has_constructor_attr ๐Ÿ”’
Returns true when the attribute list contains #[miniextendr(constructor)] or #[miniextendr(r6(constructor))] / #[miniextendr(s3(constructor))] etc.
is_cfg_active ๐Ÿ”’
Evaluate whether a set of #[cfg(...)] attributes is active given the current features.
is_external_ptr_self_ty ๐Ÿ”’
Returns true if ty is ExternalPtr<Self> (last path segment = ExternalPtr, single type argument = Self).
is_suppressed ๐Ÿ”’
Check if a lint code is suppressed via // mxl::allow(MXL...) comment.
line_has_allow ๐Ÿ”’
Check if a single line contains // mxl::allow(...) matching the given code.
parse_file ๐Ÿ”’
scan_ffi_unchecked_calls ๐Ÿ”’
Scan raw source text for ffi::*_unchecked() calls.
scan_rf_error_calls ๐Ÿ”’
Scan raw source text for direct Rf_error/Rf_errorcall calls.
walk_module_file ๐Ÿ”’
Recursively walk a module file, following mod declarations.