Use tcx.require_lang_item
instead of unwrapping
This commit is contained in:
parent
0f7d81754d
commit
b80356a5ab
9 changed files with 14 additions and 12 deletions
|
@ -2625,7 +2625,7 @@ impl<'tcx> TypeErrCtxtExt<'tcx> for TypeErrCtxt<'_, 'tcx> {
|
|||
}
|
||||
};
|
||||
|
||||
let from_generator = tcx.lang_items().from_generator_fn().unwrap();
|
||||
let from_generator = tcx.require_lang_item(LangItem::FromGenerator, None);
|
||||
|
||||
// Don't print the tuple of capture types
|
||||
'print: {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue