From f77fead0029921a23421020542e957fb1654c456 Mon Sep 17 00:00:00 2001 From: León Orell Valerian Liehr Date: Sun, 29 Jun 2025 01:31:53 +0200 Subject: Fix the span of trait bound modifier `[const]` --- compiler/rustc_parse/src/parser/ty.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'compiler/rustc_parse/src/parser') diff --git a/compiler/rustc_parse/src/parser/ty.rs b/compiler/rustc_parse/src/parser/ty.rs index f181097813d..d874a071cee 100644 --- a/compiler/rustc_parse/src/parser/ty.rs +++ b/compiler/rustc_parse/src/parser/ty.rs @@ -1071,7 +1071,7 @@ impl<'a> Parser<'a> { && self.look_ahead(1, |t| t.is_keyword(kw::Const)) && self.look_ahead(2, |t| *t == token::CloseBracket) { - let start = self.prev_token.span; + let start = self.token.span; self.bump(); self.expect_keyword(exp!(Const)).unwrap(); self.bump(); -- cgit 1.4.1-3-g733a5