From 4738231cc78f25fe628a7a01269802466b346737 Mon Sep 17 00:00:00 2001 From: "leonardo.yvens" Date: Tue, 12 Sep 2017 17:04:26 -0300 Subject: [PATCH] Remove deprecated lang items They have been deprecated for years and there is no trace left of them in the compiler. --- src/librustc/middle/lang_items.rs | 8 -------- src/librustc_typeck/variance/terms.rs | 9 --------- 2 files changed, 17 deletions(-) diff --git a/src/librustc/middle/lang_items.rs b/src/librustc/middle/lang_items.rs index cb59d9870fa..ad243a1061d 100644 --- a/src/librustc/middle/lang_items.rs +++ b/src/librustc/middle/lang_items.rs @@ -327,14 +327,6 @@ language_item_table! { PhantomDataItem, "phantom_data", phantom_data; - // Deprecated: - CovariantTypeItem, "covariant_type", covariant_type; - ContravariantTypeItem, "contravariant_type", contravariant_type; - InvariantTypeItem, "invariant_type", invariant_type; - CovariantLifetimeItem, "covariant_lifetime", covariant_lifetime; - ContravariantLifetimeItem, "contravariant_lifetime", contravariant_lifetime; - InvariantLifetimeItem, "invariant_lifetime", invariant_lifetime; - NonZeroItem, "non_zero", non_zero; DebugTraitLangItem, "debug_trait", debug_trait; diff --git a/src/librustc_typeck/variance/terms.rs b/src/librustc_typeck/variance/terms.rs index 6062ac96ada..ac3d575b648 100644 --- a/src/librustc_typeck/variance/terms.rs +++ b/src/librustc_typeck/variance/terms.rs @@ -98,15 +98,6 @@ fn lang_items(tcx: TyCtxt) -> Vec<(ast::NodeId, Vec)> { let all = vec![ (lang_items.phantom_data(), vec![ty::Covariant]), (lang_items.unsafe_cell_type(), vec![ty::Invariant]), - - // Deprecated: - (lang_items.covariant_type(), vec![ty::Covariant]), - (lang_items.contravariant_type(), vec![ty::Contravariant]), - (lang_items.invariant_type(), vec![ty::Invariant]), - (lang_items.covariant_lifetime(), vec![ty::Covariant]), - (lang_items.contravariant_lifetime(), vec![ty::Contravariant]), - (lang_items.invariant_lifetime(), vec![ty::Invariant]), - ]; all.into_iter() // iterating over (Option, Variance)