Auto merge of #116427 - cjgillot:no-internal, r=oli-obk · rust-lang/rust@5c3a0e9
@@ -830,22 +830,6 @@ pub struct LocalDecl<'tcx> {
830830// FIXME(matthewjasper) Don't store in this in `Body`
831831pub local_info: ClearCrossCrate<Box<LocalInfo<'tcx>>>,
832832833-/// `true` if this is an internal local.
834- ///
835- /// These locals are not based on types in the source code and are only used
836- /// for a few desugarings at the moment.
837- ///
838- /// The generator transformation will sanity check the locals which are live
839- /// across a suspension point against the type components of the generator
840- /// which type checking knows are live across a suspension point. We need to
841- /// flag drop flags to avoid triggering this check as they are introduced
842- /// outside of type inference.
843- ///
844- /// This should be sound because the drop flags are fully algebraic, and
845- /// therefore don't affect the auto-trait or outlives properties of the
846- /// generator.
847- pub internal: bool,
848-849833/// The type of this local.
850834 pub ty: Ty<'tcx>,
851835@@ -1058,7 +1042,7 @@ impl<'tcx> LocalDecl<'tcx> {
10581042self.source_info.span.desugaring_kind().is_some()
10591043}
106010441061-/// Creates a new `LocalDecl` for a temporary: mutable, non-internal.
1045+/// Creates a new `LocalDecl` for a temporary, mutable.
10621046 #[inline]
10631047pub fn new(ty: Ty<'tcx>, span: Span) -> Self {
10641048Self::with_source_info(ty, SourceInfo::outermost(span))
@@ -1070,20 +1054,12 @@ impl<'tcx> LocalDecl<'tcx> {
10701054LocalDecl {
10711055mutability: Mutability::Mut,
10721056local_info: ClearCrossCrate::Set(Box::new(LocalInfo::Boring)),
1073-internal: false,
10741057 ty,
10751058user_ty: None,
10761059 source_info,
10771060}
10781061}
107910621080-/// Converts `self` into same `LocalDecl` except tagged as internal.
1081- #[inline]
1082-pub fn internal(mut self) -> Self {
1083-self.internal = true;
1084-self
1085-}
1086-10871063/// Converts `self` into same `LocalDecl` except tagged as immutable.
10881064 #[inline]
10891065pub fn immutable(mut self) -> Self {