From bbf497b0eb2caec0e8c9ffba7f37dc84885e2e90 Mon Sep 17 00:00:00 2001 From: Aaron Hill Date: Tue, 9 Jun 2020 20:31:12 -0400 Subject: [PATCH] Add doc comments --- src/librustc_ast/ast.rs | 2 +- src/librustc_middle/mir/mod.rs | 2 ++ src/librustc_mir_build/hair/mod.rs | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/librustc_ast/ast.rs b/src/librustc_ast/ast.rs index 5012fbb30b0f..9016d35ea0e5 100644 --- a/src/librustc_ast/ast.rs +++ b/src/librustc_ast/ast.rs @@ -1165,7 +1165,7 @@ pub enum ExprKind { /// and the remaining elements are the rest of the arguments. /// Thus, `x.foo::(a, b, c, d)` is represented as /// `ExprKind::MethodCall(PathSegment { foo, [Bar, Baz] }, [x, a, b, c, d])`. - /// The `Span` is the span of the function, without the dot and receiver + /// This `Span` is the span of the function, without the dot and receiver /// (e.g. `foo(a, b)` in `x.foo(a, b)` MethodCall(PathSegment, Vec>, Span), /// A tuple (e.g., `(a, b, c, d)`). diff --git a/src/librustc_middle/mir/mod.rs b/src/librustc_middle/mir/mod.rs index 6ffed5244001..98746d63fac0 100644 --- a/src/librustc_middle/mir/mod.rs +++ b/src/librustc_middle/mir/mod.rs @@ -1131,6 +1131,8 @@ pub enum TerminatorKind<'tcx> { /// `true` if this is from a call in HIR rather than from an overloaded /// operator. True for overloaded function call. from_hir_call: bool, + /// This `Span` is the span of the function, without the dot and receiver + /// (e.g. `foo(a, b)` in `x.foo(a, b)` fn_span: Span, }, diff --git a/src/librustc_mir_build/hair/mod.rs b/src/librustc_mir_build/hair/mod.rs index 140b8bbe15e3..d3ec5595365b 100644 --- a/src/librustc_mir_build/hair/mod.rs +++ b/src/librustc_mir_build/hair/mod.rs @@ -146,6 +146,8 @@ crate enum ExprKind<'tcx> { // Whether this is from a call in HIR, rather than from an overloaded // operator. True for overloaded function call. from_hir_call: bool, + /// This `Span` is the span of the function, without the dot and receiver + /// (e.g. `foo(a, b)` in `x.foo(a, b)` fn_span: Span, }, Deref {