[][src]Module rustc::ty::adjustment

🔬 This is a nightly-only experimental API. (rustc_private)

this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?

Structs

Adjustment [
Experimental
]

Represents coercing a value to a different type of value.

CoerceUnsizedInfo [
Experimental
]

Information for CoerceUnsized impls, storing information we have computed about the coercion.

OverloadedDeref [
Experimental
]

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.

Enums

Adjust [
Experimental
]
AllowTwoPhase [
Experimental
]

At least for initial deployment, we want to limit two-phase borrows to only a few specific cases. Right now, those mostly "things that desugar" into method calls - using x.some_method() syntax, where some_method takes &mut self - using Foo::some_method(&mut x, ...) syntax - binary assignment operators (+=, -=, *=, etc.) Anything else should be rejected until generalized two phase borrow support is implemented. Right now, dataflow can't handle the general case where there is more than one use of a mutable borrow, and we don't want to accept too much new code via two-phase borrows, so we try to limit where we create two-phase capable mutable borrows. See #49434 for tracking.

AutoBorrow [
Experimental
]
AutoBorrowMutability [
Experimental
]
CustomCoerceUnsized [
Experimental
]