1
Fork 0

Use is_lang_item more

This commit is contained in:
Michael Goulet 2024-08-13 16:44:37 -04:00
parent e08b80c0fb
commit bac19686a5
12 changed files with 26 additions and 24 deletions

View file

@ -838,7 +838,7 @@ impl<'tcx> Instance<'tcx> {
return None;
};
if tcx.lang_items().get(coroutine_callable_item) == Some(trait_item_id) {
if tcx.is_lang_item(trait_item_id, coroutine_callable_item) {
let ty::Coroutine(_, id_args) = *tcx.type_of(coroutine_def_id).skip_binder().kind()
else {
bug!()