summaryrefslogtreecommitdiff
path: root/compiler/rustc_hir/src/lang_items.rs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/rustc_hir/src/lang_items.rs')
-rw-r--r--compiler/rustc_hir/src/lang_items.rs8
1 files changed, 0 insertions, 8 deletions
diff --git a/compiler/rustc_hir/src/lang_items.rs b/compiler/rustc_hir/src/lang_items.rs
index 1f08befb180..4b3bc816b95 100644
--- a/compiler/rustc_hir/src/lang_items.rs
+++ b/compiler/rustc_hir/src/lang_items.rs
@@ -8,7 +8,6 @@
//! * Functions called by the compiler itself.
use crate::def_id::DefId;
-use crate::errors::LangItemError;
use crate::{MethodKind, Target};
use rustc_ast as ast;
@@ -42,13 +41,6 @@ impl LanguageItems {
self.items[item as usize] = Some(def_id);
}
- /// Requires that a given `LangItem` was bound and returns the corresponding `DefId`.
- /// If it wasn't bound, e.g. due to a missing `#[lang = "<it.name()>"]`,
- /// returns an error encapsulating the `LangItem`.
- pub fn require(&self, it: LangItem) -> Result<DefId, LangItemError> {
- self.get(it).ok_or_else(|| LangItemError(it))
- }
-
pub fn iter(&self) -> impl Iterator<Item = (LangItem, DefId)> + '_ {
self.items
.iter()