Skip to content

Commit 151e989

Browse files
committed
also explain how to resolve MethodCall
1 parent 6515371 commit 151e989

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/librustc/hir/mod.rs

+6-1
Original file line numberDiff line numberDiff line change
@@ -1616,6 +1616,11 @@ pub enum ExprKind {
16161616
/// and the remaining elements are the rest of the arguments.
16171617
/// Thus, `x.foo::<Bar, Baz>(a, b, c, d)` is represented as
16181618
/// `ExprKind::MethodCall(PathSegment { foo, [Bar, Baz] }, [x, a, b, c, d])`.
1619+
///
1620+
/// To resolve the called method to a `DefId`, call [`type_dependent_def_id`] with
1621+
/// the `hir_id` of the `MethodCall` node itself.
1622+
///
1623+
/// [`qpath_res`]: ../ty/struct.TypeckTables.html#method.type_dependent_def_id
16191624
MethodCall(P<PathSegment>, Span, HirVec<Expr>),
16201625
/// A tuple (e.g., `(a, b, c, d)`).
16211626
Tup(HirVec<Expr>),
@@ -1701,7 +1706,7 @@ pub enum ExprKind {
17011706
///
17021707
/// To resolve the path to a `DefId`, call [`qpath_res`].
17031708
///
1704-
/// [`qpath_res`]: ty/struct.TypeckTables.html#method.qpath_res
1709+
/// [`qpath_res`]: ../ty/struct.TypeckTables.html#method.qpath_res
17051710
#[derive(RustcEncodable, RustcDecodable, Debug, HashStable)]
17061711
pub enum QPath {
17071712
/// Path to a definition, optionally "fully-qualified" with a `Self`

0 commit comments

Comments
 (0)