Skip to content

Commit 91376f4

Browse files
committedAug 12, 2024
Auto merge of #129008 - GuillaumeGomez:rollup-6citttb, r=GuillaumeGomez
Rollup of 10 pull requests Successful merges: - #128149 (nontemporal_store: make sure that the intrinsic is truly just a hint) - #128394 (Unify run button display with "copy code" button and with mdbook buttons) - #128537 (const vector passed through to codegen) - #128632 (std: do not overwrite style in `get_backtrace_style`) - #128878 (Slightly refactor `Flags` in bootstrap) - #128886 (Get rid of some `#[allow(rustc::untranslatable_diagnostic)]`) - #128929 (Fix codegen-units tests that were disabled 8 years ago) - #128937 (Fix warnings in rmake tests on `x86_64-unknown-linux-gnu`) - #128978 (Use `assert_matches` around the compiler more) - #128994 (Fix bug in `Parser::look_ahead`.) r? `@ghost` `@rustbot` modify labels: rollup
2 parents e08b80c + 99a785d commit 91376f4

File tree

132 files changed

+789
-449
lines changed

Some content is hidden

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

132 files changed

+789
-449
lines changed
 

‎compiler/rustc_ast_lowering/messages.ftl

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,11 +167,23 @@ ast_lowering_template_modifier = template modifier
167167
168168
ast_lowering_this_not_async = this is not `async`
169169
170+
ast_lowering_underscore_array_length_unstable =
171+
using `_` for array lengths is unstable
172+
170173
ast_lowering_underscore_expr_lhs_assign =
171174
in expressions, `_` can only be used on the left-hand side of an assignment
172175
.label = `_` not allowed here
173176
177+
ast_lowering_unstable_inline_assembly = inline assembly is not stable yet on this architecture
178+
ast_lowering_unstable_inline_assembly_const_operands =
179+
const operands for inline assembly are unstable
180+
ast_lowering_unstable_inline_assembly_label_operands =
181+
label operands for inline assembly are unstable
182+
ast_lowering_unstable_may_unwind = the `may_unwind` option is unstable
183+
174184
ast_lowering_use_angle_brackets = use angle brackets instead
185+
186+
ast_lowering_yield = yield syntax is experimental
175187
ast_lowering_yield_in_closure =
176188
`yield` can only be used in `#[coroutine]` closures, or `gen` blocks
177189
.suggestion = use `#[coroutine]` to make this closure a coroutine

‎compiler/rustc_ast_lowering/src/asm.rs

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,12 @@ use super::errors::{
1919
InvalidRegisterClass, RegisterClassOnlyClobber, RegisterConflict,
2020
};
2121
use super::LoweringContext;
22-
use crate::{ImplTraitContext, ImplTraitPosition, ParamMode, ResolverAstLoweringExt};
22+
use crate::{
23+
fluent_generated as fluent, ImplTraitContext, ImplTraitPosition, ParamMode,
24+
ResolverAstLoweringExt,
25+
};
2326

2427
impl<'a, 'hir> LoweringContext<'a, 'hir> {
25-
#[allow(rustc::untranslatable_diagnostic)] // FIXME: make this translatable
2628
pub(crate) fn lower_inline_asm(
2729
&mut self,
2830
sp: Span,
@@ -52,7 +54,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
5254
&self.tcx.sess,
5355
sym::asm_experimental_arch,
5456
sp,
55-
"inline assembly is not stable yet on this architecture",
57+
fluent::ast_lowering_unstable_inline_assembly,
5658
)
5759
.emit();
5860
}
@@ -64,8 +66,13 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
6466
self.dcx().emit_err(AttSyntaxOnlyX86 { span: sp });
6567
}
6668
if asm.options.contains(InlineAsmOptions::MAY_UNWIND) && !self.tcx.features().asm_unwind {
67-
feature_err(&self.tcx.sess, sym::asm_unwind, sp, "the `may_unwind` option is unstable")
68-
.emit();
69+
feature_err(
70+
&self.tcx.sess,
71+
sym::asm_unwind,
72+
sp,
73+
fluent::ast_lowering_unstable_may_unwind,
74+
)
75+
.emit();
6976
}
7077

7178
let mut clobber_abis = FxIndexMap::default();
@@ -182,7 +189,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
182189
sess,
183190
sym::asm_const,
184191
*op_sp,
185-
"const operands for inline assembly are unstable",
192+
fluent::ast_lowering_unstable_inline_assembly_const_operands,
186193
)
187194
.emit();
188195
}
@@ -246,7 +253,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
246253
sess,
247254
sym::asm_goto,
248255
*op_sp,
249-
"label operands for inline assembly are unstable",
256+
fluent::ast_lowering_unstable_inline_assembly_label_operands,
250257
)
251258
.emit();
252259
}

0 commit comments

Comments
 (0)