diff options
| author | bors <bors@rust-lang.org> | 2022-10-01 17:11:19 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-10-01 17:11:19 +0000 |
| commit | 56a35bc906be1250a76fdb9a4b70e9261e10aec5 (patch) | |
| tree | fadad570b55acc7b2df2f40d110f6ecf0b54b36e /compiler/rustc_session/src | |
| parent | edadc7ccdda644ef8149869d2f24018a1dac202a (diff) | |
| parent | 51e2f03af28c8e2a83a7cb51d8482297d8326260 (diff) | |
Auto merge of #102545 - matthiaskrgr:rollup-13i3tc3, r=matthiaskrgr
Rollup of 3 pull requests Successful merges: - #101675 (Improve `File::set_times` error handling) - #102500 (Remove `expr_parentheses_needed` from `ParseSess`) - #102533 (rustdoc: remove unused CSS selector `a.source`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_session/src')
| -rw-r--r-- | compiler/rustc_session/src/parse.rs | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/compiler/rustc_session/src/parse.rs b/compiler/rustc_session/src/parse.rs index d97e1df2a16..2c3d8d5283b 100644 --- a/compiler/rustc_session/src/parse.rs +++ b/compiler/rustc_session/src/parse.rs @@ -2,9 +2,7 @@ //! It also serves as an input to the parser itself. use crate::config::CheckCfg; -use crate::errors::{ - ExprParenthesesNeeded, FeatureDiagnosticForIssue, FeatureDiagnosticHelp, FeatureGateError, -}; +use crate::errors::{FeatureDiagnosticForIssue, FeatureDiagnosticHelp, FeatureGateError}; use crate::lint::{ builtin::UNSTABLE_SYNTAX_PRE_EXPANSION, BufferedEarlyLint, BuiltinLintDiagnostics, Lint, LintId, }; @@ -13,8 +11,8 @@ use rustc_data_structures::fx::{FxHashMap, FxHashSet, FxIndexSet}; use rustc_data_structures::sync::{Lock, Lrc}; use rustc_errors::{emitter::SilentEmitter, ColorConfig, Handler}; use rustc_errors::{ - fallback_fluent_bundle, AddToDiagnostic, Diagnostic, DiagnosticBuilder, DiagnosticId, - DiagnosticMessage, EmissionGuarantee, ErrorGuaranteed, IntoDiagnostic, MultiSpan, StashKey, + fallback_fluent_bundle, Diagnostic, DiagnosticBuilder, DiagnosticId, DiagnosticMessage, + EmissionGuarantee, ErrorGuaranteed, IntoDiagnostic, MultiSpan, StashKey, }; use rustc_feature::{find_feature_issue, GateIssue, UnstableFeatures}; use rustc_span::edition::Edition; @@ -324,12 +322,6 @@ impl ParseSess { }); } - /// Extend an error with a suggestion to wrap an expression with parentheses to allow the - /// parser to continue parsing the following operation as part of the same expression. - pub fn expr_parentheses_needed(&self, err: &mut Diagnostic, span: Span) { - ExprParenthesesNeeded::surrounding(span).add_to_diagnostic(err); - } - pub fn save_proc_macro_span(&self, span: Span) -> usize { let mut spans = self.proc_macro_quoted_spans.lock(); spans.push(span); |
