Skip to main content

PlaceCoerce

Trait PlaceCoerce 

Source
pub unsafe trait PlaceCoerce<From>: HasPlace
where From: HasPlace<Target = Self> + PlaceDeref<NoopProj<Self>>,
{ type Output: HasPlace<Target = Self::Target>; }
Expand description

If at a coercion site an expression e has type T but type U was expected, and T: HasPlace and T::Target: PlaceCoerce<T>, then we replace e with @T::Target::Output **e and repeat this until types match and raise an error otherwise.

Required Associated Types§

Source

type Output: HasPlace<Target = Self::Target>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<'a, 'b, T: ?Sized> PlaceCoerce<&'a &'b T> for &'b T

Source§

impl<'a, 'b, T: ?Sized> PlaceCoerce<&'a &'b mut T> for &'b mut T

Source§

impl<'a, 'b, T: ?Sized> PlaceCoerce<&'a mut &'b T> for &'b T

Source§

impl<'a, 'b, T: ?Sized> PlaceCoerce<&'a mut &'b mut T> for &'b mut T

Implementors§