about summary refs log tree commit diff
path: root/compiler/rustc_errors/src
diff options
context:
space:
mode:
authorDylan DPC <99973273+Dylan-DPC@users.noreply.github.com>2022-09-08 20:48:34 +0530
committerGitHub <noreply@github.com>2022-09-08 20:48:34 +0530
commit1561922a1279abbf8dbb3620b9bbe7f725853a86 (patch)
tree162afadcb2fca3c00de5fdb0e6aa7852f2c536fb /compiler/rustc_errors/src
parentd392838b69a4f9d2c4a109412820f454a1dfa2cf (diff)
parent0e497a714ebfefbee094b8475ea9aa4eeaa7b692 (diff)
downloadrust-1561922a1279abbf8dbb3620b9bbe7f725853a86.tar.gz
rust-1561922a1279abbf8dbb3620b9bbe7f725853a86.zip
Rollup merge of #101041 - LuisCardosoOliveira:translation-rename-attr-warning-pt2, r=davidtwco
translations(rustc_session): migrates rustc_session to use SessionDiagnostic - Pt. 2

# Description

This is the second part of the `rustc_session` [migration](https://github.com/rust-lang/rust/issues/100717#issuecomment-1220279883).

**Please only review this [commit](https://github.com/rust-lang/rust/pull/101041/commits/501858195734ec77f6b121ef753b03c40645df23) that belongs to the part 2. The other ones are from the PR [#100753](https://github.com/rust-lang/rust/pull/100753) that is not yet merged.**

In this PR, we migrate the files `session.rs` and `config.rs`.

Please not that we have to `allow` the lints rules in some functions from `session.rs` because they are (at least I believe) part of the diagnostic machinery.
Diffstat (limited to 'compiler/rustc_errors/src')
-rw-r--r--compiler/rustc_errors/src/diagnostic.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/compiler/rustc_errors/src/diagnostic.rs b/compiler/rustc_errors/src/diagnostic.rs
index a052aaee047..a774b52c8a5 100644
--- a/compiler/rustc_errors/src/diagnostic.rs
+++ b/compiler/rustc_errors/src/diagnostic.rs
@@ -10,10 +10,11 @@ use rustc_lint_defs::{Applicability, LintExpectationId};
 use rustc_span::edition::LATEST_STABLE_EDITION;
 use rustc_span::symbol::{Ident, MacroRulesNormalizedIdent, Symbol};
 use rustc_span::{edition::Edition, Span, DUMMY_SP};
-use rustc_target::spec::PanicStrategy;
+use rustc_target::spec::{PanicStrategy, SplitDebuginfo, StackProtector, TargetTriple};
 use std::borrow::Cow;
 use std::fmt;
 use std::hash::{Hash, Hasher};
+use std::num::ParseIntError;
 use std::path::{Path, PathBuf};
 
 /// Error type for `Diagnostic`'s `suggestions` field, indicating that
@@ -91,6 +92,10 @@ into_diagnostic_arg_using_display!(
     Edition,
     Ident,
     MacroRulesNormalizedIdent,
+    ParseIntError,
+    StackProtector,
+    &TargetTriple,
+    SplitDebuginfo
 );
 
 impl IntoDiagnosticArg for bool {