Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 5 pull requests #128997

Closed
wants to merge 37 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
f83b085
rustc_attr: remove redundant `#[allow(rustc::untranslatable_diagnosti…
GrigorenkoPV Aug 7, 2024
43f3a21
rustc_const_eval: remove redundant `#[allow(rustc::untranslatable_dia…
GrigorenkoPV Aug 7, 2024
3a18c6b
rustc_const_eval: make message about "const stable" translatable
GrigorenkoPV Aug 7, 2024
a11922d
rustc_const_eval: make LazyLock suggestion translatable
GrigorenkoPV Aug 7, 2024
c36b21a
rustc_attr: make "compact `cfg(target(..))` is unstable" translatable
GrigorenkoPV Aug 7, 2024
334a097
rustc_ast_lowering: make "using `_` for array lengths is unstable" tr…
GrigorenkoPV Aug 7, 2024
290df4f
rustc_ast_lowering: make "yield syntax is experimental" translatable
GrigorenkoPV Aug 7, 2024
6760298
rustc_ast_lowering: make asm-related unstability messages translatable
GrigorenkoPV Aug 7, 2024
48413cf
rustc_borrowck: make dereference suggestion translatable
GrigorenkoPV Aug 8, 2024
446e03e
rustc_borrowck: make suggestion to move closure translatable
GrigorenkoPV Aug 8, 2024
1b6cc24
rustc_borrowck: make some suggestion about static lifetimes translatable
GrigorenkoPV Aug 8, 2024
1481ab3
rustc_borrowck: make "implicit static" suff translatable
GrigorenkoPV Aug 8, 2024
f43cdce
rustc_borrowck: fmt
GrigorenkoPV Aug 8, 2024
fbc2459
rustc_expand: remove some redundant `#[allow(rustc::untranslatable_di…
GrigorenkoPV Aug 8, 2024
1373074
rustc_expand: make a message translatable
GrigorenkoPV Aug 8, 2024
cbae581
rustc_interface: remove a redundant `#[allow(rustc::untranslatable_di…
GrigorenkoPV Aug 8, 2024
2babab6
rustc_lint: remove some redundant `#[allow(rustc::untranslatable_diag…
GrigorenkoPV Aug 8, 2024
d548636
rustc_metadata: remove a redundant `#[allow(rustc::untranslatable_dia…
GrigorenkoPV Aug 8, 2024
007cc2c
rustc_metadata: make "link {arg,cfg} is unstable" translatable
GrigorenkoPV Aug 8, 2024
fcdb374
rustc_passes: remove a redundant `#[allow(rustc::untranslatable_diagn…
GrigorenkoPV Aug 9, 2024
f09a2b0
rustc_passes: make some messages in check_attr translatable
GrigorenkoPV Aug 9, 2024
4f8042e
Support reading thin archives in ArArchiveBuilder
bjorn3 Aug 10, 2024
a57f73d
Add test for thin archive reading support
bjorn3 Aug 10, 2024
c1f5350
Use ArArchiveBuilder with the LLVM backend too
bjorn3 Aug 10, 2024
141d9dc
remove unused imports from rmake tests
lqd Aug 10, 2024
f4cb0de
remove other warnings from rmake tests
lqd Aug 10, 2024
d63a067
Add fixme for removing LlvmArchiveBuilder in the future
bjorn3 Aug 10, 2024
dcd6170
use `rfs` in rustdoc io rmake test
lqd Aug 11, 2024
db68a19
Fix review comments and other improvements
bjorn3 Aug 11, 2024
01a97ed
bootstrap: fix trying to modify file times on read-only file
jieyouxu Aug 11, 2024
13c36f1
bootstrap: extract out a `set_file_times` helper
jieyouxu Aug 11, 2024
c361c92
Use assert_matches around the compiler
compiler-errors Aug 11, 2024
cb9e0df
Rollup merge of #128886 - GrigorenkoPV:untranslatable-diagnostic, r=n…
matthiaskrgr Aug 12, 2024
530f481
Rollup merge of #128936 - bjorn3:fix_thin_archive_reading, r=jieyouxu
matthiaskrgr Aug 12, 2024
4211fa8
Rollup merge of #128937 - lqd:clean-rmake-tests, r=jieyouxu
matthiaskrgr Aug 12, 2024
dd3fe6a
Rollup merge of #128977 - jieyouxu:writable-file, r=Kobzol
matthiaskrgr Aug 12, 2024
a5599f8
Rollup merge of #128978 - compiler-errors:assert-matches, r=jieyouxu
matthiaskrgr Aug 12, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
rustc_ast_lowering: make "using _ for array lengths is unstable" tr…
…anslatable
GrigorenkoPV committed Aug 10, 2024

Verified

This commit was signed with the committer’s verified signature.
commit 334a097137ebcf319d02a6fb54777ce2002dbe35
3 changes: 3 additions & 0 deletions compiler/rustc_ast_lowering/messages.ftl
Original file line number Diff line number Diff line change
@@ -167,6 +167,9 @@ ast_lowering_template_modifier = template modifier
ast_lowering_this_not_async = this is not `async`
ast_lowering_underscore_array_length_unstable =
using `_` for array lengths is unstable
ast_lowering_underscore_expr_lhs_assign =
in expressions, `_` can only be used on the left-hand side of an assignment
.label = `_` not allowed here
3 changes: 1 addition & 2 deletions compiler/rustc_ast_lowering/src/lib.rs
Original file line number Diff line number Diff line change
@@ -2326,7 +2326,6 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
self.expr_block(block)
}

#[allow(rustc::untranslatable_diagnostic)] // FIXME: make this translatable
fn lower_array_length(&mut self, c: &AnonConst) -> hir::ArrayLen<'hir> {
match c.value.kind {
ExprKind::Underscore => {
@@ -2340,7 +2339,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
&self.tcx.sess,
sym::generic_arg_infer,
c.value.span,
"using `_` for array lengths is unstable",
fluent_generated::ast_lowering_underscore_array_length_unstable,
)
.stash(c.value.span, StashKey::UnderscoreForArrayLengths);
hir::ArrayLen::Body(self.lower_anon_const_to_const_arg(c))