Rollup merge of #143171 - fmease:fix-span-of-maybe-const-mod, r=compiler-errors

Fix the span of trait bound modifier `[const]`

r? project-const-traits or anyone
This commit is contained in:
Matthias Krüger
2025-06-29 06:59:33 +02:00
committed by GitHub
31 changed files with 268 additions and 268 deletions

View File

@@ -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();