Rename adjustment::PointerCast and variants using it to PointerCoercion
It makes it sound like the `ExprKind` and `Rvalue` are supposed to represent all pointer related casts, when in reality their just used to share a some enum variants. Make it clear there these are only coercion to make it clear why only some pointer related "casts" are in the enum.
This commit is contained in:
@@ -6,7 +6,7 @@ use rustc_span::Span;
|
||||
use rustc_target::abi::FieldIdx;
|
||||
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq, TyEncodable, TyDecodable, Hash, HashStable)]
|
||||
pub enum PointerCast {
|
||||
pub enum PointerCoercion {
|
||||
/// Go from a fn-item type to a fn-pointer type.
|
||||
ReifyFnPointer,
|
||||
|
||||
@@ -99,7 +99,7 @@ pub enum Adjust<'tcx> {
|
||||
/// Take the address and produce either a `&` or `*` pointer.
|
||||
Borrow(AutoBorrow<'tcx>),
|
||||
|
||||
Pointer(PointerCast),
|
||||
Pointer(PointerCoercion),
|
||||
|
||||
/// Cast into a dyn* object.
|
||||
DynStar,
|
||||
|
||||
Reference in New Issue
Block a user