diff --git a/src/librustc_ast/ast.rs b/src/librustc_ast/ast.rs index 5012fbb30b0..9016d35ea0e 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 6ffed524400..98746d63fac 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 140b8bbe15e..d3ec5595365 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 {