]> git.proxmox.com Git - rustc.git/blobdiff - compiler/rustc_typeck/src/check/fn_ctxt/mod.rs
New upstream version 1.63.0+dfsg1
[rustc.git] / compiler / rustc_typeck / src / check / fn_ctxt / mod.rs
index d04277bcf87b1b9ca8b1e87b0f3bd9730b0f2079..8b680a3d042da52c12b83032e3d5fd42ff6fca9b 100644 (file)
@@ -1,4 +1,5 @@
 mod _impl;
+mod arg_matrix;
 mod checks;
 mod suggestions;
 
@@ -114,6 +115,9 @@ pub struct FnCtxt<'a, 'tcx> {
     /// either given explicitly or inferred from, say, an `Fn*` trait
     /// bound. Used for diagnostic purposes only.
     pub(super) return_type_pre_known: bool,
+
+    /// True if the return type has an Opaque type
+    pub(super) return_type_has_opaque: bool,
 }
 
 impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
@@ -140,6 +144,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
             }),
             inh,
             return_type_pre_known: true,
+            return_type_has_opaque: false,
         }
     }
 
@@ -255,7 +260,7 @@ impl<'a, 'tcx> AstConv<'tcx> for FnCtxt<'a, 'tcx> {
         item_segment: &hir::PathSegment<'_>,
         poly_trait_ref: ty::PolyTraitRef<'tcx>,
     ) -> Ty<'tcx> {
-        let (trait_ref, _) = self.replace_bound_vars_with_fresh_vars(
+        let trait_ref = self.replace_bound_vars_with_fresh_vars(
             span,
             infer::LateBoundRegionConversionTime::AssocTypeProjection(item_def_id),
             poly_trait_ref,