Rollup merge of #148256 - lcnr:orphan-check, r=spastorino,WaffleLapkin

remove support for `typeof`

see https://github.com/rust-lang/compiler-team/issues/940 closes https://github.com/rust-lang/rust/issues/148700

This also enables checks for invariants previously broken by `typeof` again.

r? types
This commit is contained in:
Matthias Krüger 2025-11-27 15:59:11 +01:00 committed by GitHub
commit d67a12dfff
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
43 changed files with 40 additions and 332 deletions

View file

@ -2513,8 +2513,6 @@ pub enum TyKind {
ImplTrait(NodeId, #[visitable(extra = BoundKind::Impl)] GenericBounds),
/// No-op; kept solely so that we can pretty-print faithfully.
Paren(Box<Ty>),
/// Unused for now.
Typeof(AnonConst),
/// This means the type should be inferred instead of it having been
/// specified. This can appear anywhere in a type.
Infer,

View file

@ -294,7 +294,6 @@ fn type_trailing_braced_mac_call(mut ty: &ast::Ty) -> Option<&ast::MacCall> {
| ast::TyKind::Never
| ast::TyKind::Tup(..)
| ast::TyKind::Paren(..)
| ast::TyKind::Typeof(..)
| ast::TyKind::Infer
| ast::TyKind::ImplicitSelf
| ast::TyKind::CVarArgs