From e003b0b1cc49b2b42193ad7bf7716042eb4dc2c6 Mon Sep 17 00:00:00 2001 From: Ary Borenszweig Date: Fri, 26 Jul 2024 18:52:39 -0300 Subject: [PATCH] Another use of turbofish_span --- compiler/noirc_frontend/src/elaborator/types.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/compiler/noirc_frontend/src/elaborator/types.rs b/compiler/noirc_frontend/src/elaborator/types.rs index 430967d8a51..0922478cd95 100644 --- a/compiler/noirc_frontend/src/elaborator/types.rs +++ b/compiler/noirc_frontend/src/elaborator/types.rs @@ -1623,9 +1623,9 @@ impl<'context> Elaborator<'context> { } if segment.generics.is_some() { - // From "foo::", create a span for just "::" - let span = Span::from(segment.ident.span().end()..segment.span.end()); - self.push_err(TypeCheckError::UnsupportedTurbofishUsage { span }); + self.push_err(TypeCheckError::UnsupportedTurbofishUsage { + span: segment.turbofish_span(), + }); } } }