Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 9c20b2a

Browse files
committedAug 17, 2022
Auto merge of #100677 - matthiaskrgr:rollup-au41ho1, r=matthiaskrgr
Rollup of 15 pull requests Successful merges: - #99474 (Rustdoc json tests: New `@hasexact` test command) - #99972 (interpret: only consider 1-ZST when searching for receiver) - #100018 (Clean up `LitKind`) - #100379 (triagebot: add translation-related mention groups) - #100389 (Do not report cycle error when inferring return type for suggestion) - #100489 (`is_knowable` use `Result` instead of `Option`) - #100532 (unwind: don't build dependency when building for Miri) - #100608 (needless separation of impl blocks) - #100621 (Pass +atomics-32 feature for {arm,thumb}v4t-none-eabi) - #100646 (Migrate emoji identifier diagnostics to `SessionDiagnostic` in rustc_interface) - #100652 (Remove deferred sized checks (make them eager)) - #100655 (Update books) - #100656 (Update cargo) - #100660 (Fixed a few documentation errors) - #100661 (Fixed a few documentation errors) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2 parents 86c6ebe + 1199dbd commit 9c20b2a

File tree

84 files changed

+584
-421
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

84 files changed

+584
-421
lines changed
 

‎compiler/rustc_error_messages/src/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ fluent_messages! {
3434
builtin_macros => "../locales/en-US/builtin_macros.ftl",
3535
const_eval => "../locales/en-US/const_eval.ftl",
3636
expand => "../locales/en-US/expand.ftl",
37+
interface => "../locales/en-US/interface.ftl",
3738
lint => "../locales/en-US/lint.ftl",
3839
parser => "../locales/en-US/parser.ftl",
3940
passes => "../locales/en-US/passes.ftl",

‎compiler/rustc_errors/src/annotate_snippet_emitter_writer.rs

+11-8
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
88
use crate::emitter::FileWithAnnotatedLines;
99
use crate::snippet::Line;
10+
use crate::translation::Translate;
1011
use crate::{
1112
CodeSuggestion, Diagnostic, DiagnosticId, DiagnosticMessage, Emitter, FluentBundle,
1213
LazyFallbackBundle, Level, MultiSpan, Style, SubDiagnostic,
@@ -32,6 +33,16 @@ pub struct AnnotateSnippetEmitterWriter {
3233
macro_backtrace: bool,
3334
}
3435

36+
impl Translate for AnnotateSnippetEmitterWriter {
37+
fn fluent_bundle(&self) -> Option<&Lrc<FluentBundle>> {
38+
self.fluent_bundle.as_ref()
39+
}
40+
41+
fn fallback_fluent_bundle(&self) -> &FluentBundle {
42+
&**self.fallback_bundle
43+
}
44+
}
45+
3546
impl Emitter for AnnotateSnippetEmitterWriter {
3647
/// The entry point for the diagnostics generation
3748
fn emit_diagnostic(&mut self, diag: &Diagnostic) {
@@ -63,14 +74,6 @@ impl Emitter for AnnotateSnippetEmitterWriter {
6374
self.source_map.as_ref()
6475
}
6576

66-
fn fluent_bundle(&self) -> Option<&Lrc<FluentBundle>> {
67-
self.fluent_bundle.as_ref()
68-
}
69-
70-
fn fallback_fluent_bundle(&self) -> &FluentBundle {
71-
&**self.fallback_bundle
72-
}
73-
7477
fn should_show_explain(&self) -> bool {
7578
!self.short_message
7679
}
There was a problem loading the remainder of the diff.

0 commit comments

Comments
 (0)
Failed to load comments.