{"str", Kind::STR},
{"f32_runtime", Kind::F32_RUNTIME},
{"f64_runtime", Kind::F64_RUNTIME},
+
+ {"Some", Kind::OPTION_SOME},
+ {"None", Kind::OPTION_NONE},
+
+ {"into_iter", Kind::INTOITER_INTOITER},
+ {"next", Kind::ITERATOR_NEXT},
}};
tl::optional<LangItem::Kind>
class LangItem
{
public:
+ // FIXME: We should clean up that enum to make it more inline with the list of
+ // lang-items in Rust 1.49
+ // https://github.com/rust-lang/rust/blob/1.49.0/compiler/rustc_hir/src/lang_items.rs
enum class Kind
{
// https://github.com/rust-lang/rust/blob/master/library/core/src/ops/arith.rs
STR,
F32_RUNTIME,
F64_RUNTIME,
+
+ OPTION_SOME,
+ OPTION_NONE,
+
+ INTOITER_INTOITER,
+ ITERATOR_NEXT,
};
static const BiMap<std::string, Kind> lang_items;