diff options
| author | Michael Goulet <michael@errs.io> | 2022-10-02 20:25:48 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2022-10-02 20:43:13 +0000 |
| commit | 90a8d67491d8d861343cc30d2e2712967192fef4 (patch) | |
| tree | 1f9a4164bd2f8747eef92ffdb74f647a70acbfd5 /compiler/rustc_middle | |
| parent | 39323a5877ee6b85e75c652c2518a97a1433a2dc (diff) | |
| download | rust-90a8d67491d8d861343cc30d2e2712967192fef4.tar.gz rust-90a8d67491d8d861343cc30d2e2712967192fef4.zip | |
Avoid ICE in printing RPITIT type
Diffstat (limited to 'compiler/rustc_middle')
| -rw-r--r-- | compiler/rustc_middle/src/ty/print/pretty.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_middle/src/ty/print/pretty.rs b/compiler/rustc_middle/src/ty/print/pretty.rs index f69ac076820..82d7c0a97cb 100644 --- a/compiler/rustc_middle/src/ty/print/pretty.rs +++ b/compiler/rustc_middle/src/ty/print/pretty.rs @@ -927,7 +927,7 @@ pub trait PrettyPrinter<'tcx>: // unless we can find out what generator return type it comes from. let term = if let Some(ty) = term.skip_binder().ty() && let ty::Projection(proj) = ty.kind() - && let assoc = tcx.associated_item(proj.item_def_id) + && let Some(assoc) = tcx.opt_associated_item(proj.item_def_id) && assoc.trait_container(tcx) == tcx.lang_items().gen_trait() && assoc.name == rustc_span::sym::Return { |
