diff options
| author | bors <bors@rust-lang.org> | 2023-10-20 08:19:54 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-10-20 08:19:54 +0000 |
| commit | c7f3948028cf5bcbfd2ba2fb511186c0f72e4d26 (patch) | |
| tree | a690510fbea85c710c89df0b202fa6ad241d914b /compiler/rustc_middle/src | |
| parent | 7849162ace72b5793f23ad68ed985c247e3cab13 (diff) | |
| parent | e8e9f6a32af51fab7aae62f3f551aa3be8ff1ba2 (diff) | |
Auto merge of #116946 - compiler-errors:movability-and-mutability, r=lcnr
Uplift movability and mutability, the simple way Just make type_ir a dependency of ast. This can be relaxed later if we want to make the dependency less heavy. Part of rust-lang/types-team#124. r? `@lcnr` or `@jackh726`
Diffstat (limited to 'compiler/rustc_middle/src')
| -rw-r--r-- | compiler/rustc_middle/src/ty/context.rs | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/compiler/rustc_middle/src/ty/context.rs b/compiler/rustc_middle/src/ty/context.rs index 82c7f8ab486..cad3aac23d8 100644 --- a/compiler/rustc_middle/src/ty/context.rs +++ b/compiler/rustc_middle/src/ty/context.rs @@ -88,8 +88,6 @@ impl<'tcx> Interner for TyCtxt<'tcx> { type Predicate = Predicate<'tcx>; type PredicateKind = ty::PredicateKind<'tcx>; type TypeAndMut = TypeAndMut<'tcx>; - type Mutability = hir::Mutability; - type Movability = hir::Movability; type Ty = Ty<'tcx>; type Tys = &'tcx List<Ty<'tcx>>; type AliasTy = ty::AliasTy<'tcx>; @@ -118,13 +116,9 @@ impl<'tcx> Interner for TyCtxt<'tcx> { fn ty_and_mut_to_parts( TypeAndMut { ty, mutbl }: TypeAndMut<'tcx>, - ) -> (Self::Ty, Self::Mutability) { + ) -> (Self::Ty, ty::Mutability) { (ty, mutbl) } - - fn mutability_is_mut(mutbl: Self::Mutability) -> bool { - mutbl.is_mut() - } } type InternedSet<'tcx, T> = ShardedHashMap<InternedInSet<'tcx, T>, ()>; |
