From 3e0421774138516ee5ccbd1fe6019e79579c29bd Mon Sep 17 00:00:00 2001 From: Mike Gerwitz Date: Fri, 29 Apr 2022 13:07:51 -0400 Subject: [PATCH] tamer: diagnose::report::Section::maybe_squash_into: Remove syslabel TODO Previously, when adjacent duplicate spans were both resolved, if one failed, the other certainly would, which would result in duplicate labels each squash. Elided spans do not have syslabels, and so this is no longer a concern. DEV-12151 --- tamer/src/diagnose/report.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tamer/src/diagnose/report.rs b/tamer/src/diagnose/report.rs index 2a5991e4..75fd74c0 100644 --- a/tamer/src/diagnose/report.rs +++ b/tamer/src/diagnose/report.rs @@ -310,9 +310,8 @@ impl<'s, 'd> Section<'d> { ) -> Option { match extend { Some(extend_sec) if self.span == extend_sec.span => { - // TODO: At the time of writing this will cause duplication of - // system labels, - // which is not desirable. + // Note that system labels shouldn't exist for elided spans + // and so they should not be duplicated when squashing. extend_sec.body.extend( self.body .into_iter()