summaryrefslogtreecommitdiffstats
path: root/src/test/ui-fulldeps/internal-lints/ty_tykind_usage.rs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:13 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:13 +0000
commit218caa410aa38c29984be31a5229b9fa717560ee (patch)
treec54bd55eeb6e4c508940a30e94c0032fbd45d677 /src/test/ui-fulldeps/internal-lints/ty_tykind_usage.rs
parentReleasing progress-linux version 1.67.1+dfsg1-1~progress7.99u1. (diff)
downloadrustc-218caa410aa38c29984be31a5229b9fa717560ee.tar.xz
rustc-218caa410aa38c29984be31a5229b9fa717560ee.zip
Merging upstream version 1.68.2+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/test/ui-fulldeps/internal-lints/ty_tykind_usage.rs')
-rw-r--r--src/test/ui-fulldeps/internal-lints/ty_tykind_usage.rs56
1 files changed, 0 insertions, 56 deletions
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::<kind>`
-
- match kind {
- TyKind::Bool => (), //~ ERROR usage of `ty::TyKind::<kind>`
- TyKind::Char => (), //~ ERROR usage of `ty::TyKind::<kind>`
- TyKind::Int(..) => (), //~ ERROR usage of `ty::TyKind::<kind>`
- TyKind::Uint(..) => (), //~ ERROR usage of `ty::TyKind::<kind>`
- TyKind::Float(..) => (), //~ ERROR usage of `ty::TyKind::<kind>`
- TyKind::Adt(..) => (), //~ ERROR usage of `ty::TyKind::<kind>`
- TyKind::Foreign(..) => (), //~ ERROR usage of `ty::TyKind::<kind>`
- TyKind::Str => (), //~ ERROR usage of `ty::TyKind::<kind>`
- TyKind::Array(..) => (), //~ ERROR usage of `ty::TyKind::<kind>`
- TyKind::Slice(..) => (), //~ ERROR usage of `ty::TyKind::<kind>`
- TyKind::RawPtr(..) => (), //~ ERROR usage of `ty::TyKind::<kind>`
- TyKind::Ref(..) => (), //~ ERROR usage of `ty::TyKind::<kind>`
- TyKind::FnDef(..) => (), //~ ERROR usage of `ty::TyKind::<kind>`
- TyKind::FnPtr(..) => (), //~ ERROR usage of `ty::TyKind::<kind>`
- TyKind::Dynamic(..) => (), //~ ERROR usage of `ty::TyKind::<kind>`
- TyKind::Closure(..) => (), //~ ERROR usage of `ty::TyKind::<kind>`
- TyKind::Generator(..) => (), //~ ERROR usage of `ty::TyKind::<kind>`
- TyKind::GeneratorWitness(..) => (), //~ ERROR usage of `ty::TyKind::<kind>`
- TyKind::Never => (), //~ ERROR usage of `ty::TyKind::<kind>`
- TyKind::Tuple(..) => (), //~ ERROR usage of `ty::TyKind::<kind>`
- TyKind::Projection(..) => (), //~ ERROR usage of `ty::TyKind::<kind>`
- TyKind::Opaque(..) => (), //~ ERROR usage of `ty::TyKind::<kind>`
- TyKind::Param(..) => (), //~ ERROR usage of `ty::TyKind::<kind>`
- TyKind::Bound(..) => (), //~ ERROR usage of `ty::TyKind::<kind>`
- TyKind::Placeholder(..) => (), //~ ERROR usage of `ty::TyKind::<kind>`
- TyKind::Infer(..) => (), //~ ERROR usage of `ty::TyKind::<kind>`
- TyKind::Error(_) => (), //~ ERROR usage of `ty::TyKind::<kind>`
- }
-
- if let ty::Int(int_ty) = kind {}
-
- if let TyKind::Int(int_ty) = kind {} //~ ERROR usage of `ty::TyKind::<kind>`
-
- fn ty_kind(ty_bad: TyKind<'_>, ty_good: Ty<'_>) {} //~ ERROR usage of `ty::TyKind`
-
- fn ir_ty_kind<I: Interner>(bad: IrTyKind<I>) -> IrTyKind<I> {
- //~^ ERROR usage of `ty::TyKind`
- //~| ERROR usage of `ty::TyKind`
- IrTyKind::Bool //~ ERROR usage of `ty::TyKind::<kind>`
- }
-}