Skip to main content

Module utils

Module utils 

Source

Re-exportsยง

use std::fmt; ๐Ÿ”’
use std::fmt::Display; ๐Ÿ”’
use std::fmt::Write as _; ๐Ÿ”’
use std::sync::LazyLock as Lazy; ๐Ÿ”’
use std::ascii; ๐Ÿ”’
use std::mem; ๐Ÿ”’
use rustc_ast as ast; ๐Ÿ”’
use rustc_ast::join_path_idents; ๐Ÿ”’
use rustc_ast::token::Token; ๐Ÿ”’
use rustc_ast::token::TokenKind; ๐Ÿ”’
use rustc_ast::tokenstream::TokenTree; ๐Ÿ”’
use rustc_attr_ir::DocAttribute; ๐Ÿ”’
use rustc_attr_ir::find_attr; ๐Ÿ”’
use rustc_data_structures::thin_vec::ThinVec; ๐Ÿ”’
use rustc_data_structures::thin_vec::thin_vec; ๐Ÿ”’
use rustc_hir as hir; ๐Ÿ”’
use rustc_hir::def::DefKind; ๐Ÿ”’
use rustc_hir::def::Res; ๐Ÿ”’
use rustc_hir::def_id::DefId; ๐Ÿ”’
use rustc_hir::def_id::LOCAL_CRATE; ๐Ÿ”’
use rustc_hir::def_id::LocalDefId; ๐Ÿ”’
use rustc_metadata::rendered_const; ๐Ÿ”’
use rustc_middle::mir; ๐Ÿ”’
use rustc_middle::ty; ๐Ÿ”’
use rustc_middle::ty::GenericArgKind; ๐Ÿ”’
use rustc_middle::ty::TyCtxt; ๐Ÿ”’
use rustc_middle::ty::TypeVisitableExt; ๐Ÿ”’
use rustc_span::def_id::ModId; ๐Ÿ”’
use rustc_span::symbol::Symbol; ๐Ÿ”’
use rustc_span::symbol::kw; ๐Ÿ”’
use rustc_span::symbol::sym; ๐Ÿ”’
use tracing::debug; ๐Ÿ”’
use tracing::warn; ๐Ÿ”’
use crate::clean::auto_trait::synthesize_auto_trait_impls; ๐Ÿ”’
use crate::clean::blanket_impl::synthesize_blanket_impls; ๐Ÿ”’
use crate::clean::render_macro_matchers::render_macro_matcher; ๐Ÿ”’
use crate::clean::AssocItemConstraint; ๐Ÿ”’
use crate::clean::AssocItemConstraintKind; ๐Ÿ”’
use crate::clean::AssocType; ๐Ÿ”’
use crate::clean::Crate; ๐Ÿ”’
use crate::clean::ExternalCrate; ๐Ÿ”’
use crate::clean::Generic; ๐Ÿ”’
use crate::clean::GenericArg; ๐Ÿ”’
use crate::clean::GenericArgs; ๐Ÿ”’
use crate::clean::ImportSource; ๐Ÿ”’
use crate::clean::Item; ๐Ÿ”’
use crate::clean::ItemKind; ๐Ÿ”’
use crate::clean::Lifetime; ๐Ÿ”’
use crate::clean::Path; ๐Ÿ”’
use crate::clean::PathSegment; ๐Ÿ”’
use crate::clean::Primitive; ๐Ÿ”’
use crate::clean::PrimitiveType; ๐Ÿ”’
use crate::clean::Term; ๐Ÿ”’
use crate::clean::Type; ๐Ÿ”’
use crate::clean::clean_doc_module; ๐Ÿ”’
use crate::clean::clean_middle_const; ๐Ÿ”’
use crate::clean::clean_middle_region; ๐Ÿ”’
use crate::clean::clean_middle_ty; ๐Ÿ”’
use crate::clean::inline; ๐Ÿ”’
use crate::core::DocContext; ๐Ÿ”’
use crate::display::Joined as _; ๐Ÿ”’
use crate::formats::item_type::ItemType; ๐Ÿ”’

Macrosยง

debug_assert_matches
Asserts that an expression matches the provided pattern.

Constantsยง

DOC_RUST_LANG_ORG_VERSION ๐Ÿ”’
A link to doc.rust-lang.org that includes the channel name. Use this instead of manual links so that the channel is consistent.

Staticsยง

RUSTDOC_VERSION ๐Ÿ”’

Functionsยง

build_deref_target_impls ๐Ÿ”’
can_elide_generic_arg ๐Ÿ”’
Check if the generic argument actual coincides with the default and can therefore be elided.
clean_middle_generic_args ๐Ÿ”’
clean_middle_generic_args_with_constraints ๐Ÿ”’
clean_middle_path ๐Ÿ”’
display_macro_source ๐Ÿ”’
enter_impl_trait ๐Ÿ”’
find_nearest_parent_module ๐Ÿ”’
Find the nearest parent module of a [DefId].
format_integer_with_underscore_sep ๐Ÿ”’
has_doc_flag ๐Ÿ”’
This function exists because it runs on rustc_attr_ir::Attributes whereas the other is a clean::Attributes method.
inherits_doc_hidden ๐Ÿ”’
is_literal_expr ๐Ÿ”’
krate ๐Ÿ”’
name_from_pat ๐Ÿ”’
print_const ๐Ÿ”’
print_const_with_custom_print_scalar ๐Ÿ”’
print_evaluated_const ๐Ÿ”’
qpath_to_string ๐Ÿ”’
register_res ๐Ÿ”’
If res has a documentation page associated, store it in the cache.
render_macro_arms ๐Ÿ”’
Render a sequence of macro arms in a format suitable for displaying to the user as part of an item declaration.
resolve_type ๐Ÿ”’
Given a type Path, resolve it to a Type using the TyCtxt
resolve_use_source ๐Ÿ”’
should_ignore_res ๐Ÿ”’
synthesize_auto_trait_and_blanket_impls ๐Ÿ”’