]> git.lizzy.rs Git - rust.git/commitdiff
Add docs for FnCtxt::resolve_ufcs
authorjam1garner <8260240+jam1garner@users.noreply.github.com>
Thu, 27 May 2021 01:52:56 +0000 (21:52 -0400)
committerNiko Matsakis <niko@alum.mit.edu>
Mon, 14 Jun 2021 17:27:24 +0000 (13:27 -0400)
compiler/rustc_typeck/src/check/method/mod.rs

index ba4635cc1bf4fa0fa70625df7a7d4529a84259bc..d2bd4b0dd32ae9b002620734ad4d156f33b0b1db 100644 (file)
@@ -468,6 +468,18 @@ pub fn lookup_method_in_trait(
         Some(InferOk { obligations, value: callee })
     }
 
+    /// Performs "universal function call" lookup. If lookup is successful, it will return the type
+    /// of definition and the [`DefId`] of the found definition.
+    ///
+    /// # Arguments
+    ///
+    /// Given a function call like `Foo::bar::<T1,...Tn>(...)`:
+    ///
+    /// * `self`:                  the surrounding `FnCtxt` (!)
+    /// * `span`:                  the span of the entire function call
+    /// * `method_name`:           the identifier of the function within the container type (`bar`)
+    /// * `self_ty`:               the type to search within (`Foo`)
+    /// * `expr_id`:               the [`hir::HirId`] of the expression composing the entire call
     #[instrument(level = "debug", skip(self))]
     pub fn resolve_ufcs(
         &self,