diff options
| author | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2023-08-13 11:30:48 +0000 |
|---|---|---|
| committer | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2023-08-13 13:33:37 +0000 |
| commit | ef2da4a49b95ff83c232c04c3df1e02244cedd82 (patch) | |
| tree | 6e33e92865e1e002250487bce938ccb641866bb7 /compiler/rustc_parse/src/parser/mod.rs | |
| parent | 5f3abbc52fc460c05f24648cce3969a41c0b02e9 (diff) | |
| download | rust-ef2da4a49b95ff83c232c04c3df1e02244cedd82.tar.gz rust-ef2da4a49b95ff83c232c04c3df1e02244cedd82.zip | |
Remove reached_eof from ParseSess
It was only ever set in a function which isn't called anywhere.
Diffstat (limited to 'compiler/rustc_parse/src/parser/mod.rs')
| -rw-r--r-- | compiler/rustc_parse/src/parser/mod.rs | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/compiler/rustc_parse/src/parser/mod.rs b/compiler/rustc_parse/src/parser/mod.rs index c5b46b809b1..ce4d4a60551 100644 --- a/compiler/rustc_parse/src/parser/mod.rs +++ b/compiler/rustc_parse/src/parser/mod.rs @@ -29,7 +29,6 @@ use rustc_ast::{Async, AttrArgs, AttrArgsEq, Expr, ExprKind, Mutability, StrLit} use rustc_ast::{HasAttrs, HasTokens, Unsafe, Visibility, VisibilityKind}; use rustc_ast_pretty::pprust; use rustc_data_structures::fx::FxHashMap; -use rustc_data_structures::sync::Ordering; use rustc_errors::PResult; use rustc_errors::{ Applicability, DiagnosticBuilder, ErrorGuaranteed, FatalError, IntoDiagnostic, MultiSpan, @@ -1455,18 +1454,6 @@ pub(crate) fn make_unclosed_delims_error( Some(err) } -pub fn emit_unclosed_delims(unclosed_delims: &mut Vec<UnmatchedDelim>, sess: &ParseSess) { - let _ = sess.reached_eof.fetch_or( - unclosed_delims.iter().any(|unmatched_delim| unmatched_delim.found_delim.is_none()), - Ordering::Relaxed, - ); - for unmatched in unclosed_delims.drain(..) { - if let Some(mut e) = make_unclosed_delims_error(unmatched, sess) { - e.emit(); - } - } -} - /// A helper struct used when building an `AttrTokenStream` from /// a `LazyAttrTokenStream`. Both delimiter and non-delimited tokens /// are stored as `FlatToken::Token`. A vector of `FlatToken`s |
