remove MutTy - #163327
remove MutTy#163327cyrgani wants to merge 2 commits into
MutTy#163327Conversation
|
The parser was modified, potentially altering the grammar of (stable) Rust cc @fmease Some changes occurred to MIR optimizations cc @rust-lang/wg-mir-opt
cc @rust-lang/clippy
cc @rust-lang/rustfmt Some changes occurred in compiler/rustc_builtin_macros/src/autodiff.rs cc @ZuseZ4 HIR ty lowering was modified cc @fmease Some changes occurred in compiler/rustc_ast/src/expand/autodiff_attrs.rs cc @ZuseZ4 |
|
r? @mejrs rustbot has assigned @mejrs. Use Why was this reviewer chosen?The reviewer was selected based on:
|
This comment has been minimized.
This comment has been minimized.
8bd1981 to
d1818bc
Compare
|
Huh I thought we had this before and changed at some point to bundle the pointer with its mutability. Or was that only in TyKind? Either way, we should keep all three in sync, so also do the change for TyKind::Ref and Ptr, or keep all three in the MutTy system. |
|
It was removed from |
This PR removes
ast::MutTyandhir::MutTyand inlines their two fields directly into their correspondingTypeKindvariants. These types probably made sense in pre-1.0 versions where it still had a syntax-level representation with things like[mut T]. Nowadays, it is just a type that is used in some, but not all places to group a type and a mutability together (for example,rustc_type_irdoes not include such a wrapper). It also has no methods and just makes some match statements more verbose. Removing it makes them more readable.