about summary refs log tree commit diff
path: root/compiler/rustc_parse/src/parser/expr.rs
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2023-07-31 16:36:27 +1000
committerNicholas Nethercote <n.nethercote@gmail.com>2023-08-02 10:11:41 +1000
commit6fc2c481e5a7daf1873ccc34926f1c0387979569 (patch)
treeadb1638698fe0ea4f7fc05661f0168c97ea6fb6a /compiler/rustc_parse/src/parser/expr.rs
parent54eb6bc34c841c8d81afd1bbe15446bf3e20990c (diff)
downloadrust-6fc2c481e5a7daf1873ccc34926f1c0387979569.tar.gz
rust-6fc2c481e5a7daf1873ccc34926f1c0387979569.zip
Move `TokenCursor::break_last_token` into `Parser`.
Similar to the last commit, it's more of a `Parser`-level concern than a
`TokenCursor`-level concern. And the struct size reductions are nice.

After this change, `TokenCursor` is as minimal as possible (two fields
and two methods) which is nice.
Diffstat (limited to 'compiler/rustc_parse/src/parser/expr.rs')
-rw-r--r--compiler/rustc_parse/src/parser/expr.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_parse/src/parser/expr.rs b/compiler/rustc_parse/src/parser/expr.rs
index 55f857aa31c..975dafecb10 100644
--- a/compiler/rustc_parse/src/parser/expr.rs
+++ b/compiler/rustc_parse/src/parser/expr.rs
@@ -1167,7 +1167,7 @@ impl<'a> Parser<'a> {
             DestructuredFloat::TrailingDot(sym, sym_span, dot_span) => {
                 assert!(suffix.is_none());
                 // Analogous to `Self::break_and_eat`
-                self.token_cursor.break_last_token = true;
+                self.break_last_token = true;
                 // This might work, in cases like `1. 2`, and might not,
                 // in cases like `offset_of!(Ty, 1.)`. It depends on what comes
                 // after the float-like token, and therefore we have to make