Skip to main content

Module adjustment

Module adjustment 

Source

Re-exportsยง

use rustc_abi::FieldIdx; ๐Ÿ”’
use rustc_attr_ir::lang_items::LangItem; ๐Ÿ”’
use rustc_hir as hir; ๐Ÿ”’
use rustc_hir::def_id::DefId; ๐Ÿ”’
use rustc_macros::StableHash; ๐Ÿ”’
use rustc_macros::TyDecodable; ๐Ÿ”’
use rustc_macros::TyEncodable; ๐Ÿ”’
use rustc_macros::TypeFoldable; ๐Ÿ”’
use rustc_macros::TypeVisitable; ๐Ÿ”’
use rustc_span::Span; ๐Ÿ”’
use crate::ty::Ty; ๐Ÿ”’
use crate::ty::TyCtxt; ๐Ÿ”’

Structsยง

Adjustment
Represents coercing a value to a different type of value.
CoerceUnsizedInfo
Information for CoerceUnsized impls, storing information we have computed about the coercion.
OverloadedDeref
An overloaded autoderef step, representing a Deref(Mut)::deref(_mut) call, with the signature &'a T -> &'a U or &'a mut T -> &'a mut U. The target type is U in both cases, with the region and mutability being those shared by both the receiver and the returned reference.
PatAdjustment
Represents an implicit coercion applied to the scrutinee of a match before testing a pattern against it. Currently, this is used only for implicit dereferences.

Enumsยง

Adjust
AllowTwoPhase
At least for initial deployment, we want to limit two-phase borrows to only a few specific cases. Right now, those are mostly โ€œthings that desugarโ€ into method calls:
AutoBorrow
AutoBorrowMutability
CustomCoerceUnsized
DerefAdjustKind
PatAdjust
Represents implicit coercions of patternsโ€™ types, rather than valuesโ€™ types.
PointerCoercion