You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Auto merge of #126491 - compiler-errors:is_lang_item, r=oli-obk
Add `TyCtxt::is_lang_item`, use it in the compiler
```rust
pub fn is_lang_item(self, def_id: DefId, lang_item: LangItem) -> bool;
```
Easier than having to use `Some(def_id) == tcx.lang_items().iterator_trait()` or something. Also makes it easier to turn into `TraitSolverLangItem` in the future. Hope it's not too bad for perf.
r? `@lcnr` or `@oli-obk`
// Adapted from https://github.com/rust-lang/rust/blob/f3c66088610c1b80110297c2d9a8b5f9265b013f/compiler/rustc_hir_analysis/src/check/intrinsicck.rs#L136-L151
0 commit comments