From 8c85c9936f6bc28b6e8e31bed8f4b1bd95c7e836 Mon Sep 17 00:00:00 2001 From: Takayuki Maeda Date: Thu, 4 Aug 2022 20:43:35 +0900 Subject: [PATCH] add a comment about what we can parse now --- compiler/rustc_parse_format/src/lib.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/compiler/rustc_parse_format/src/lib.rs b/compiler/rustc_parse_format/src/lib.rs index c98c8cae3782e..4890fade50faf 100644 --- a/compiler/rustc_parse_format/src/lib.rs +++ b/compiler/rustc_parse_format/src/lib.rs @@ -763,6 +763,8 @@ impl<'a> Parser<'a> { let byte_pos = self.to_span_index(end); let start = InnerOffset(byte_pos.0 + 1); let field = self.argument(start); + // We can only parse `foo.bar` field access, any deeper nesting, + // or another type of expression, like method calls, are not supported if !self.consume('}') { return; }