Skip to content

Commit 1c9952f

Browse files
committed
Auto merge of rust-lang#145334 - Kobzol:rollup-fs5a133, r=Kobzol
Rollup of 11 pull requests Successful merges: - rust-lang#143467 (Add ASCII-related methods from `u8` and `MIN`/`MAX` to `core::ascii::Char`) - rust-lang#144519 (Constify `SystemTime` methods) - rust-lang#144642 (editorconfig: don't trim trailing whitespace in tests) - rust-lang#144870 (Stabilize `path_file_prefix` feature) - rust-lang#145269 (Deprecate RUST_TEST_* env variables) - rust-lang#145274 (Remove unused `#[must_use]`) - rust-lang#145289 (chore(ci): upgrade checkout to v5) - rust-lang#145303 (Docs: Link to payload_as_str() from payload().) - rust-lang#145308 (Adjust documentation of `dangling`) - rust-lang#145320 (Allow cross-compiling the Cranelift dist component) - rust-lang#145325 (Add `cast_init` and `cast_uninit` methods for pointers) r? `@ghost` `@rustbot` modify labels: rollup
2 parents b1b26b8 + 8cb78fe commit 1c9952f

File tree

48 files changed

+1268
-322
lines changed

Some content is hidden

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

48 files changed

+1268
-322
lines changed

.editorconfig

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,18 @@ root = true
77
[*]
88
end_of_line = lf
99
charset = utf-8
10-
trim_trailing_whitespace = true
1110
insert_final_newline = true
1211

12+
# some tests need trailing whitespace in output snapshots
13+
[!tests/]
14+
trim_trailing_whitespace = true
15+
# for actual source code files of test, we still don't want trailing whitespace
16+
[tests/**.{rs,js}]
17+
trim_trailing_whitespace = true
18+
# these specific source files need to have trailing whitespace.
19+
[tests/ui/{frontmatter/frontmatter-whitespace-3.rs,parser/shebang/shebang-space.rs}]
20+
trim_trailing_whitespace = false
21+
1322
[!src/llvm-project]
1423
indent_style = space
1524
indent_size = 4

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252
run_type: ${{ steps.jobs.outputs.run_type }}
5353
steps:
5454
- name: Checkout the source code
55-
uses: actions/checkout@v4
55+
uses: actions/checkout@v5
5656
- name: Test citool
5757
# Only test citool on the auto branch, to reduce latency of the calculate matrix job
5858
# on PR/try builds.
@@ -113,7 +113,7 @@ jobs:
113113
run: git config --global core.autocrlf false
114114

115115
- name: checkout the source code
116-
uses: actions/checkout@v4
116+
uses: actions/checkout@v5
117117
with:
118118
fetch-depth: 2
119119

@@ -313,7 +313,7 @@ jobs:
313313
if: ${{ !cancelled() && contains(fromJSON('["auto", "try"]'), needs.calculate_matrix.outputs.run_type) }}
314314
steps:
315315
- name: checkout the source code
316-
uses: actions/checkout@v4
316+
uses: actions/checkout@v5
317317
with:
318318
fetch-depth: 2
319319
# Calculate the exit status of the whole CI workflow.

.github/workflows/dependencies.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151
runs-on: ubuntu-24.04
5252
steps:
5353
- name: checkout the source code
54-
uses: actions/checkout@v4
54+
uses: actions/checkout@v5
5555
with:
5656
submodules: recursive
5757
- name: install the bootstrap toolchain
@@ -101,7 +101,7 @@ jobs:
101101
pull-requests: write
102102
steps:
103103
- name: checkout the source code
104-
uses: actions/checkout@v4
104+
uses: actions/checkout@v5
105105

106106
- name: download Cargo.lock from update job
107107
uses: actions/download-artifact@v4

.github/workflows/ghcr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
# Needed to write to the ghcr.io registry
3030
packages: write
3131
steps:
32-
- uses: actions/checkout@v4
32+
- uses: actions/checkout@v5
3333
with:
3434
persist-credentials: false
3535

.github/workflows/post-merge.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
permissions:
1616
pull-requests: write
1717
steps:
18-
- uses: actions/checkout@v4
18+
- uses: actions/checkout@v5
1919
with:
2020
# Make sure that we have enough commits to find the parent merge commit.
2121
# Since all merges should be through merge commits, fetching two commits

compiler/rustc_expand/src/expand.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2155,6 +2155,7 @@ impl<'a, 'b> InvocationCollector<'a, 'b> {
21552155
attr_name,
21562156
macro_name: pprust::path_to_string(&call.path),
21572157
invoc_span: call.path.span,
2158+
attr_span: attr.span,
21582159
},
21592160
);
21602161
}

compiler/rustc_lint/messages.ftl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -983,6 +983,7 @@ lint_unused_allocation_mut = unnecessary allocation, use `&mut` instead
983983
984984
lint_unused_builtin_attribute = unused attribute `{$attr_name}`
985985
.note = the built-in attribute `{$attr_name}` will be ignored, since it's applied to the macro invocation `{$macro_name}`
986+
.suggestion = remove the attribute
986987
987988
lint_unused_closure =
988989
unused {$pre}{$count ->

compiler/rustc_lint/src/early/diagnostics.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,8 +205,14 @@ pub fn decorate_builtin_lint(
205205
}
206206
.decorate_lint(diag);
207207
}
208-
BuiltinLintDiag::UnusedBuiltinAttribute { attr_name, macro_name, invoc_span } => {
209-
lints::UnusedBuiltinAttribute { invoc_span, attr_name, macro_name }.decorate_lint(diag);
208+
BuiltinLintDiag::UnusedBuiltinAttribute {
209+
attr_name,
210+
macro_name,
211+
invoc_span,
212+
attr_span,
213+
} => {
214+
lints::UnusedBuiltinAttribute { invoc_span, attr_name, macro_name, attr_span }
215+
.decorate_lint(diag);
210216
}
211217
BuiltinLintDiag::TrailingMacro(is_trailing, name) => {
212218
lints::TrailingMacro { is_trailing, name }.decorate_lint(diag);

compiler/rustc_lint/src/lints.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2938,9 +2938,10 @@ pub(crate) struct RawPrefix {
29382938
pub(crate) struct UnusedBuiltinAttribute {
29392939
#[note]
29402940
pub invoc_span: Span,
2941-
29422941
pub attr_name: Symbol,
29432942
pub macro_name: String,
2943+
#[suggestion(code = "", applicability = "machine-applicable", style = "tool-only")]
2944+
pub attr_span: Span,
29442945
}
29452946

29462947
#[derive(LintDiagnostic)]

compiler/rustc_lint_defs/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -647,6 +647,7 @@ pub enum BuiltinLintDiag {
647647
attr_name: Symbol,
648648
macro_name: String,
649649
invoc_span: Span,
650+
attr_span: Span,
650651
},
651652
PatternsInFnsWithoutBody {
652653
span: Span,

0 commit comments

Comments
 (0)