diff options
| author | Michael Goulet <michael@errs.io> | 2025-06-26 02:01:38 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2025-07-01 19:00:21 +0000 |
| commit | 2516c339829cd9193c15464218a981b8547157ca (patch) | |
| tree | 517ef869f42a69373f6e80367e1f16214883eee6 /compiler/rustc_middle/src/ty/sty.rs | |
| parent | 4e973370053a5fe87ee96d43c506623e9bd1eb9d (diff) | |
| download | rust-2516c339829cd9193c15464218a981b8547157ca.tar.gz rust-2516c339829cd9193c15464218a981b8547157ca.zip | |
Remove support for dyn*
Diffstat (limited to 'compiler/rustc_middle/src/ty/sty.rs')
| -rw-r--r-- | compiler/rustc_middle/src/ty/sty.rs | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/compiler/rustc_middle/src/ty/sty.rs b/compiler/rustc_middle/src/ty/sty.rs index 3971ac13bbe..399a6d6ebc5 100644 --- a/compiler/rustc_middle/src/ty/sty.rs +++ b/compiler/rustc_middle/src/ty/sty.rs @@ -1322,11 +1322,6 @@ impl<'tcx> Ty<'tcx> { } #[inline] - pub fn is_dyn_star(self) -> bool { - matches!(self.kind(), Dynamic(_, _, ty::DynStar)) - } - - #[inline] pub fn is_enum(self) -> bool { matches!(self.kind(), Adt(adt_def, _) if adt_def.is_enum()) } @@ -1629,8 +1624,6 @@ impl<'tcx> Ty<'tcx> { | ty::Error(_) // Extern types have metadata = (). | ty::Foreign(..) - // `dyn*` has metadata = (). - | ty::Dynamic(_, _, ty::DynStar) // If returned by `struct_tail_raw` this is a unit struct // without any fields, or not a struct, and therefore is Sized. | ty::Adt(..) @@ -1820,8 +1813,7 @@ impl<'tcx> Ty<'tcx> { | ty::Closure(..) | ty::CoroutineClosure(..) | ty::Never - | ty::Error(_) - | ty::Dynamic(_, _, ty::DynStar) => true, + | ty::Error(_) => true, ty::Str | ty::Slice(_) | ty::Dynamic(_, _, ty::Dyn) => match sizedness { SizedTraitKind::Sized => false, |
