Auto merge of #95590 - GuillaumeGomez:multi-line-attr-handling-doctest, r=notriddle
Fix multiline attributes handling in doctests Fixes #55713. I needed to have access to the `unclosed_delims` field in order to check that the attribute was completely parsed and didn't have missing parts, so I created a getter for it. r? `@notriddle`
This commit is contained in:
commit
c1550e3f8c
4 changed files with 84 additions and 8 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue