about summary refs log tree commit diff
path: root/compiler/rustc_parse/src
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume.gomez@huawei.com>2022-04-02 17:05:04 +0200
committerGuillaume Gomez <guillaume.gomez@huawei.com>2022-04-02 20:53:19 +0200
commitc37cd911a49a541b3c985c446aea1208685d05e3 (patch)
tree94d60a9175bfcf2ac37688f992251c8a9de451c6 /compiler/rustc_parse/src
parent0677edc86e342f333d4828b0ee1ef395a4e70fe5 (diff)
downloadrust-c37cd911a49a541b3c985c446aea1208685d05e3.tar.gz
rust-c37cd911a49a541b3c985c446aea1208685d05e3.zip
Fix doctest multi-line mod attributes handling
Diffstat (limited to 'compiler/rustc_parse/src')
-rw-r--r--compiler/rustc_parse/src/parser/diagnostics.rs4
1 files changed, 4 insertions, 0 deletions
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();