Use is_lang_item more
This commit is contained in:
parent
e08b80c0fb
commit
bac19686a5
12 changed files with 26 additions and 24 deletions
|
@ -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!()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue