Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit a9dc234

Browse files
jam1garnernikomatsakis
authored andcommitted
Add docs for FnCtxt::resolve_ufcs
1 parent 01bdb8e commit a9dc234

File tree

1 file changed

+12
-0
lines changed
  • compiler/rustc_typeck/src/check/method

1 file changed

+12
-0
lines changed

compiler/rustc_typeck/src/check/method/mod.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -468,6 +468,18 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
468468
Some(InferOk { obligations, value: callee })
469469
}
470470

471+
/// Performs "universal function call" lookup. If lookup is successful, it will return the type
472+
/// of definition and the [`DefId`] of the found definition.
473+
///
474+
/// # Arguments
475+
///
476+
/// Given a function call like `Foo::bar::<T1,...Tn>(...)`:
477+
///
478+
/// * `self`: the surrounding `FnCtxt` (!)
479+
/// * `span`: the span of the entire function call
480+
/// * `method_name`: the identifier of the function within the container type (`bar`)
481+
/// * `self_ty`: the type to search within (`Foo`)
482+
/// * `expr_id`: the [`hir::HirId`] of the expression composing the entire call
471483
#[instrument(level = "debug", skip(self))]
472484
pub fn resolve_ufcs(
473485
&self,

0 commit comments

Comments
 (0)