about summary refs log tree commit diff
path: root/compiler/rustc_parse/src/parser/ty.rs
diff options
context:
space:
mode:
authorMatthias Krüger <476013+matthiaskrgr@users.noreply.github.com>2025-06-29 06:59:33 +0200
committerGitHub <noreply@github.com>2025-06-29 06:59:33 +0200
commita262c001f6fd131e2eca2d45627fa5bb7754fd6c (patch)
treeece1c453c08d2e5745e341698377d075ce49828e /compiler/rustc_parse/src/parser/ty.rs
parent77757e7680439ae9c72ff6f03d68c528a44d1d81 (diff)
parentf77fead0029921a23421020542e957fb1654c456 (diff)
downloadrust-a262c001f6fd131e2eca2d45627fa5bb7754fd6c.tar.gz
rust-a262c001f6fd131e2eca2d45627fa5bb7754fd6c.zip
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
Diffstat (limited to 'compiler/rustc_parse/src/parser/ty.rs')
-rw-r--r--compiler/rustc_parse/src/parser/ty.rs2
1 files changed, 1 insertions, 1 deletions
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();