From 9d36988946067611719e9a30faec8a4c23f919e3 Mon Sep 17 00:00:00 2001 From: Alessandro Coglio Date: Sat, 30 Jul 2022 21:54:29 -0700 Subject: [PATCH] [span] Add doc comment to explain span addition. --- compiler/span/src/span.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/compiler/span/src/span.rs b/compiler/span/src/span.rs index 4cdb3f6fee..c24ebf80f4 100644 --- a/compiler/span/src/span.rs +++ b/compiler/span/src/span.rs @@ -71,6 +71,8 @@ impl std::ops::Add for &Span { impl std::ops::Add for Span { type Output = Self; + /// Add two spans together. + /// The resulting span is the smallest span that includes both. fn add(self, other: Self) -> Self { let lo = self.lo.min(other.lo); let hi = self.hi.max(other.hi);