From c37cd911a49a541b3c985c446aea1208685d05e3 Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Sat, 2 Apr 2022 17:05:04 +0200 Subject: Fix doctest multi-line mod attributes handling --- compiler/rustc_parse/src/parser/diagnostics.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'compiler/rustc_parse/src/parser') diff --git a/compiler/rustc_parse/src/parser/diagnostics.rs b/compiler/rustc_parse/src/parser/diagnostics.rs index 8f64d6d732f..0bbbd3a32c4 100644 --- a/compiler/rustc_parse/src/parser/diagnostics.rs +++ b/compiler/rustc_parse/src/parser/diagnostics.rs @@ -210,6 +210,10 @@ impl<'a> Parser<'a> { self.unclosed_delims.extend(snapshot.unclosed_delims.clone()); } + pub fn unclosed_delims(&self) -> &[UnmatchedBrace] { + &self.unclosed_delims + } + /// Create a snapshot of the `Parser`. pub(super) fn create_snapshot_for_diagnostic(&self) -> SnapshotParser<'a> { let mut snapshot = self.clone(); -- cgit 1.4.1-3-g733a5