From 218caa410aa38c29984be31a5229b9fa717560ee Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:19:13 +0200 Subject: Merging upstream version 1.68.2+dfsg1. Signed-off-by: Daniel Baumann --- .../ui-fulldeps/internal-lints/ty_tykind_usage.rs | 56 ---------------------- 1 file changed, 56 deletions(-) delete mode 100644 src/test/ui-fulldeps/internal-lints/ty_tykind_usage.rs (limited to 'src/test/ui-fulldeps/internal-lints/ty_tykind_usage.rs') diff --git a/src/test/ui-fulldeps/internal-lints/ty_tykind_usage.rs b/src/test/ui-fulldeps/internal-lints/ty_tykind_usage.rs deleted file mode 100644 index 2cb1ed6fc..000000000 --- a/src/test/ui-fulldeps/internal-lints/ty_tykind_usage.rs +++ /dev/null @@ -1,56 +0,0 @@ -// compile-flags: -Z unstable-options - -#![feature(rustc_private)] - -extern crate rustc_middle; -extern crate rustc_type_ir; - -use rustc_middle::ty::{self, Ty, TyKind}; -use rustc_type_ir::{Interner, TyKind as IrTyKind}; - -#[deny(rustc::usage_of_ty_tykind)] -fn main() { - let kind = TyKind::Bool; //~ ERROR usage of `ty::TyKind::` - - match kind { - TyKind::Bool => (), //~ ERROR usage of `ty::TyKind::` - TyKind::Char => (), //~ ERROR usage of `ty::TyKind::` - TyKind::Int(..) => (), //~ ERROR usage of `ty::TyKind::` - TyKind::Uint(..) => (), //~ ERROR usage of `ty::TyKind::` - TyKind::Float(..) => (), //~ ERROR usage of `ty::TyKind::` - TyKind::Adt(..) => (), //~ ERROR usage of `ty::TyKind::` - TyKind::Foreign(..) => (), //~ ERROR usage of `ty::TyKind::` - TyKind::Str => (), //~ ERROR usage of `ty::TyKind::` - TyKind::Array(..) => (), //~ ERROR usage of `ty::TyKind::` - TyKind::Slice(..) => (), //~ ERROR usage of `ty::TyKind::` - TyKind::RawPtr(..) => (), //~ ERROR usage of `ty::TyKind::` - TyKind::Ref(..) => (), //~ ERROR usage of `ty::TyKind::` - TyKind::FnDef(..) => (), //~ ERROR usage of `ty::TyKind::` - TyKind::FnPtr(..) => (), //~ ERROR usage of `ty::TyKind::` - TyKind::Dynamic(..) => (), //~ ERROR usage of `ty::TyKind::` - TyKind::Closure(..) => (), //~ ERROR usage of `ty::TyKind::` - TyKind::Generator(..) => (), //~ ERROR usage of `ty::TyKind::` - TyKind::GeneratorWitness(..) => (), //~ ERROR usage of `ty::TyKind::` - TyKind::Never => (), //~ ERROR usage of `ty::TyKind::` - TyKind::Tuple(..) => (), //~ ERROR usage of `ty::TyKind::` - TyKind::Projection(..) => (), //~ ERROR usage of `ty::TyKind::` - TyKind::Opaque(..) => (), //~ ERROR usage of `ty::TyKind::` - TyKind::Param(..) => (), //~ ERROR usage of `ty::TyKind::` - TyKind::Bound(..) => (), //~ ERROR usage of `ty::TyKind::` - TyKind::Placeholder(..) => (), //~ ERROR usage of `ty::TyKind::` - TyKind::Infer(..) => (), //~ ERROR usage of `ty::TyKind::` - TyKind::Error(_) => (), //~ ERROR usage of `ty::TyKind::` - } - - if let ty::Int(int_ty) = kind {} - - if let TyKind::Int(int_ty) = kind {} //~ ERROR usage of `ty::TyKind::` - - fn ty_kind(ty_bad: TyKind<'_>, ty_good: Ty<'_>) {} //~ ERROR usage of `ty::TyKind` - - fn ir_ty_kind(bad: IrTyKind) -> IrTyKind { - //~^ ERROR usage of `ty::TyKind` - //~| ERROR usage of `ty::TyKind` - IrTyKind::Bool //~ ERROR usage of `ty::TyKind::` - } -} -- cgit v1.2.3