Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
133 commits
Select commit Hold shift + click to select a range
4e6c3e9
Take care to use MSG_EOR with SOCK_SEQPACKET sockets
asomers Jan 14, 2026
a6eebbe
Stabilize `substr_range` and related methods
wr7 May 20, 2025
a5e4dc9
Handle generic reborrow in expression-use adjustment walking
P8L1 May 28, 2026
6a6599c
wasm32-wasip1-threads: Correct llvm target name
kolayne Jun 9, 2026
640d7ae
Update task.rs
xmh0511 Jun 10, 2026
4671f48
Update wake.rs
xmh0511 Jun 10, 2026
4528827
Update wake.rs
xmh0511 Jun 10, 2026
61aa163
Update library/core/src/task/wake.rs
xmh0511 Jun 10, 2026
c5c5e81
Update wake.rs
xmh0511 Jun 10, 2026
e65db42
Update library/core/src/task/wake.rs
xmh0511 Jun 10, 2026
16ccf8e
Update library/alloc/src/task.rs
xmh0511 Jun 11, 2026
a0ecf25
Update library/core/src/task/wake.rs
xmh0511 Jun 11, 2026
6f6f157
Add #[rustc_dump_generics] attribute, tests
Jun 3, 2026
0954d4c
Update wake.rs
xmh0511 Jun 12, 2026
a630360
Query the trait solver in slow path
mu001999 Jun 12, 2026
1f7863d
tests: adapt two tests for LLVM 23 changes
durin42 Jun 12, 2026
8da99a0
add test to show extra field in mgca adt const arg
Shourya742 Jun 14, 2026
86efd4b
make sure check if there are extra fields or not.
Shourya742 Jun 14, 2026
42538ca
Update library/core/src/task/wake.rs
xmh0511 Jun 15, 2026
8d8655a
stabilize str_from_utf16_endian
jnodorp Jun 15, 2026
0ab14ca
Don't suggest adding `in` to a `for` loop that already has one
onehr Jun 15, 2026
fa0e9bd
fix(?) hashmap instability
Jun 15, 2026
c3fc863
Make `proc_macro::ConversionErrorKind` non exhaustive
GuillaumeGomez Jun 15, 2026
b77dcf4
fix(rustc_middle): preserve track_caller for vtable shims
kevin-valerio Jun 16, 2026
72b3123
Add documentation for the `must_use` attribute
softfault Jun 16, 2026
84b803e
improve diagnostics and mentions struct and not expression
Shourya742 Jun 16, 2026
115338b
rustc_session: accumulate multiple -Zsanitizer target modifiers
PiJoules Jun 11, 2026
5576c5f
add adt_expr_unit_enum_extra-field test
Shourya742 Jun 17, 2026
47694ab
Rename some `get_lints` functions
nnethercote Jun 17, 2026
7dcc2dc
Simplify `HardwiredLints` and `SoftLints`.
nnethercote Jun 17, 2026
9092073
Remove useless `#[doc(hidden)]` from `ZipImpl`
theemathas Jun 17, 2026
439746b
Stabilize `strip_circumfix`
yotamofek Jun 17, 2026
6f4711f
Add simple test for incremental compilation of delegations
aerooneqq Jun 17, 2026
d8953cd
Document Panic in `get_module_children`
bushrat011899 Jun 17, 2026
d18a8ef
Clean up `register_internals`
nnethercote Jun 17, 2026
af9a706
Enable `symbol_intern_string_literal` for rustdoc.
nnethercote Jun 17, 2026
d50d1db
Move `UnusedDuplicate` diag struct to `rustc_attr_parsing`
JonathanBrouwer Jun 17, 2026
1ef529d
Rename `project-stable-mir` to `project-rustc-public`
makai410 Jun 17, 2026
b8d7dcb
fix(thir): visit reborrow source expressions
kevin-valerio Jun 17, 2026
a88521a
Reject `impl const Trait` since the right syntax is `const impl Trait…
oli-obk Jun 17, 2026
5258468
Pin dependencies
renovate-bot Jun 17, 2026
a487aec
Match all fields and removing `..`
kevin-valerio Jun 17, 2026
8410d26
Document that destructors in running threads are not run on program exit
jwodder May 20, 2026
ef672ad
format reborrow visitor arm
kevin-valerio Jun 17, 2026
4c61dd2
correct the enum extra field and make sure the diagnostic mimic the h…
Shourya742 Jun 17, 2026
b014e28
move test
RalfJung Jun 12, 2026
70a99d8
make more slice mutable ref getters rustc_no_writable
RalfJung Jun 12, 2026
1c1aca5
Add more tests for parallel frontend issues
petrochenkov Jun 17, 2026
7d9e765
Rollup merge of #157816 - RalfJung:rustc_no_writable, r=clarfonthey,s…
JonathanBrouwer Jun 17, 2026
7c3eb23
Rollup merge of #156788 - jwodder:thread-shutdown, r=traviscross
JonathanBrouwer Jun 17, 2026
a3bfe01
Rollup merge of #157957 - softfault:docs-must-use-attribute, r=Guilla…
JonathanBrouwer Jun 17, 2026
1113eb0
Rollup merge of #158006 - nnethercote:simplify-HardwiredLints-SoftLin…
JonathanBrouwer Jun 17, 2026
38ab6ce
Rollup merge of #158007 - renovate-bot:renovate/pin-dependencies, r=m…
JonathanBrouwer Jun 17, 2026
ed85b5b
Rollup merge of #158025 - nnethercote:symbol_intern_string_literal-ru…
JonathanBrouwer Jun 17, 2026
3410d7f
mips: set llvm_args -mno-check-zero-division for all mips targets
xry111 Jun 13, 2026
c1b22f4
Auto merge of #158043 - JonathanBrouwer:rollup-dYC8IEa, r=JonathanBro…
bors Jun 17, 2026
91b9f5f
cold fn for evaluate_goal_raw
jdonszelmann Jun 16, 2026
47ce0db
Rollup merge of #157788 - PiJoules:multiple-sanitizer-flags, r=petroc…
JonathanBrouwer Jun 17, 2026
62f2532
Rollup merge of #158012 - yotamofek:pr/stabilize-strip-circumfix, r=j…
JonathanBrouwer Jun 17, 2026
101eab9
Rollup merge of #157810 - mu001999-contrib:fix-157758, r=mati865
JonathanBrouwer Jun 17, 2026
5cdff6b
Rollup merge of #157829 - durin42:llvm-23-pow-fix, r=mati865
JonathanBrouwer Jun 17, 2026
18d7e5f
Rollup merge of #157873 - xry111:mips-no-div-by-zero-trap, r=folkertdev
JonathanBrouwer Jun 17, 2026
a42e95d
Rollup merge of #157886 - Shourya742:2026-06-14-reject-extra-field-mg…
JonathanBrouwer Jun 17, 2026
abbab2d
Rollup merge of #157917 - onehr:fix-for-loop-missing-in-suggestion-10…
JonathanBrouwer Jun 17, 2026
61dbfe0
Rollup merge of #157967 - kevin-valerio:fix-track-caller-vtable-shim,…
JonathanBrouwer Jun 17, 2026
d3d5fec
Rollup merge of #158019 - aerooneqq:delegation-assert-ignore, r=petro…
JonathanBrouwer Jun 17, 2026
0a666a9
Rollup merge of #158023 - JonathanBrouwer:move-unused-duplicate, r=mejrs
JonathanBrouwer Jun 17, 2026
87a98bd
Rollup merge of #158029 - makai410:rpub-update, r=wesleywiser
JonathanBrouwer Jun 17, 2026
d9dc07c
Rollup merge of #158044 - petrochenkov:partest, r=lqd
JonathanBrouwer Jun 17, 2026
534c080
Revert "add regression test for Redundant memory strores with mut par…
Filiprogrammer Jun 17, 2026
f7da3c0
Auto merge of #158047 - JonathanBrouwer:rollup-IaduMyK, r=JonathanBro…
bors Jun 17, 2026
92947b7
Document `with_added_extension` edge cases
Timmmm Jun 17, 2026
a0888bb
fix unresolved import suggestion before outer attributes
pbkx Jun 17, 2026
eee9469
rustdoc: remove more @ts-expect-error from main.js
lolbinarycat Jun 17, 2026
124145d
Change `RustcMustMatchExhaustively` to a late module lint pass.
nnethercote Jun 18, 2026
afd8ef5
Put internal lints into a single combined pass
nnethercote Jun 18, 2026
b6588e7
Rollup merge of #158049 - lolbinarycat:rustdoc-less-ts-expect-error, …
jhpratt Jun 18, 2026
8193ee6
Rollup merge of #158005 - theemathas:zipimpl-no-doc-hidden, r=jhpratt
jhpratt Jun 18, 2026
3768ec0
Auto merge of #158058 - jhpratt:rollup-JemlzIR, r=jhpratt
bors Jun 18, 2026
90a5c51
rustc book: Update wasm32-wasip1-threads's maintainers list
kolayne Jun 18, 2026
9639eef
Auto merge of #158042 - jdonszelmann:cold-ev-goal, r=lqd,JonathanBrouwer
bors Jun 18, 2026
b4f9767
Rollup merge of #158056 - nnethercote:InternalCombined, r=Urgau
jhpratt Jun 18, 2026
8796487
Rollup merge of #151132 - asomers:sock-seqpacket-eor, r=jhpratt
jhpratt Jun 18, 2026
732e5f7
Rollup merge of #157644 - kolayne:patch-1, r=jieyouxu
jhpratt Jun 18, 2026
6705db6
Rollup merge of #157912 - jnodorp:stabilize-116258, r=jhpratt
jhpratt Jun 18, 2026
fd6ca04
Rollup merge of #158048 - Filiprogrammer:revert-154841, r=Kivooeo
jhpratt Jun 18, 2026
a9362ee
Rollup merge of #158051 - Timmmm:patch-1, r=jhpratt
jhpratt Jun 18, 2026
08ea125
Rollup merge of #158054 - pbkx:issue-69733-import-before-attrs, r=Jon…
jhpratt Jun 18, 2026
61d1ca8
Rollup merge of #158062 - kolayne:patch-2, r=jieyouxu
jhpratt Jun 18, 2026
c55fad5
Auto merge of #158068 - jhpratt:rollup-9fQ5FBj, r=jhpratt
bors Jun 18, 2026
36f5b3f
Document transient connection errors from TcpListener::accept
valentynkit Jun 17, 2026
7786ffc
Bump thin-vec to 0.2.18 to address RUSTSEC-2026-0103
Turbo87 Jun 18, 2026
fee82a3
rustdoc-json-types: Replace bincode dev-dependency with postcard
Turbo87 Jun 18, 2026
34d3eed
Document the file-descriptor-limit error from TcpListener::accept
valentynkit Jun 18, 2026
b68f521
codegen ctors in runtime mir phase
jdonszelmann Jun 18, 2026
119335c
Bless tests
jdonszelmann Jun 18, 2026
1447519
Document the out-of-memory error from TcpListener::accept
valentynkit Jun 18, 2026
dbf6d75
`RegionValues`: disable unnecessary range check
amandasystems Jun 17, 2026
ebea09f
renovate: Skip dashboard approval for GitHub Actions updates
Turbo87 Jun 18, 2026
cfadf6e
renovate: Enable monthly lock file maintenance
Turbo87 Jun 18, 2026
4e0bcfc
renovate: Extend `config:recommended` preset
Turbo87 Jun 18, 2026
5db91c4
renovate: Enable config migration PRs
Turbo87 Jun 18, 2026
ebe7210
codegen_ssa: no dbginfo for scalable vec local w/ `-O0`
davidtwco Jun 18, 2026
813dbb9
Fix invalid "jump-to-def" doc link generation when an item has a `der…
GuillaumeGomez Jun 18, 2026
95cc3df
Rollup merge of #156795 - P8L1:fix-generic-reborrow-expr-use-visitor,…
GuillaumeGomez Jun 18, 2026
6244e91
Rollup merge of #157694 - xmh0511:main, r=Darksonn
GuillaumeGomez Jun 18, 2026
97e7f77
Rollup merge of #157935 - GuillaumeGomez:ConversionErrorKind-non-exha…
GuillaumeGomez Jun 18, 2026
d066582
Rollup merge of #158002 - bushrat011899:get_module_children_unwrap, r…
GuillaumeGomez Jun 18, 2026
c25ed44
Rollup merge of #158009 - oli-obk:impl-const-impl-Trait, r=fee1-dead
GuillaumeGomez Jun 18, 2026
884bed3
Rollup merge of #158034 - kevin-valerio:fix/issue-158033-reborrow-sou…
GuillaumeGomez Jun 18, 2026
7012dbe
Rollup merge of #158072 - Turbo87:update-thin-vec, r=lqd
GuillaumeGomez Jun 18, 2026
6433d9b
Rollup merge of #158074 - valentynkt:docs/accept-transient-errors, r=…
GuillaumeGomez Jun 18, 2026
1813cd7
Rollup merge of #158077 - Turbo87:bincode-replacement, r=GuillaumeGomez
GuillaumeGomez Jun 18, 2026
d454239
Rollup merge of #158086 - Turbo87:renovate-config, r=marcoieni
GuillaumeGomez Jun 18, 2026
6cb839c
Rollup merge of #158088 - davidtwco:scalable-vector-debuginfo-no-opt,…
GuillaumeGomez Jun 18, 2026
e219d61
Rollup merge of #158089 - GuillaumeGomez:jump-to-def-derive, r=Urgau
GuillaumeGomez Jun 18, 2026
bc2112e
Auto merge of #158098 - GuillaumeGomez:rollup-Rdbc7zf, r=GuillaumeGomez
bors Jun 18, 2026
f57fb8e
Initialize directly in `From<T> for OnceLock<T>`
cuviper Jun 18, 2026
72979c1
Rollup merge of #158026 - amandasystems:region-values-point-no-range-…
jhpratt Jun 18, 2026
1191a9d
Rollup merge of #158101 - cuviper:once_lock-from, r=tgross35
jhpratt Jun 18, 2026
43a9857
Change `EarlyCheckNode` from a trait to an enum.
nnethercote Jun 18, 2026
8c3f167
Auto merge of #158104 - jhpratt:rollup-EAw5CsW, r=jhpratt
bors Jun 18, 2026
d11e979
`impl [const] Default for BTreeMap`
estebank Jun 13, 2026
8e15021
Auto merge of #157384 - addiesh:turbofisherwoman, r=oli-obk
bors Jun 19, 2026
9777466
Convert '.' to '_' in bootstrap envify
jonathanpallant Jun 19, 2026
8ef1e86
Add some additional context in envify
jonathanpallant Jun 19, 2026
aa7323d
Rollup merge of #157878 - estebank:const-default-btreemap, r=jhpratt
JonathanBrouwer Jun 19, 2026
e37d7b5
Rollup merge of #158040 - jdonszelmann:fix-crash, r=oli-obk
JonathanBrouwer Jun 19, 2026
22a52cd
Rollup merge of #141266 - wr7:stabilize_substr_range, r=tgross35
JonathanBrouwer Jun 19, 2026
f74a717
Rollup merge of #158109 - nnethercote:EarlyCheckNode-trait-to-enum, r…
JonathanBrouwer Jun 19, 2026
4c7560c
Rollup merge of #158118 - ferrocene:fix-bootstrap-target-dot, r=Kobzol
JonathanBrouwer Jun 19, 2026
0c1748c
Auto merge of #158124 - JonathanBrouwer:rollup-UKcnc05, r=JonathanBro…
bors Jun 19, 2026
e2614fc
fix: add CoroutineClosure to OpaqueTypeCollector visitor
SebTardif Jun 19, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
15 changes: 13 additions & 2 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
@@ -1,14 +1,25 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:recommended",
// Open a PR to migrate the config when Renovate deprecates syntax
":configMigration",
// Refresh lock files on the first day of each month
// (still gated by dashboard approval for now)
":maintainLockFilesMonthly",
// Pin GitHub Actions to their commit SHA digests, resolving floating tags
// (e.g. `v4`) to the full SemVer version (e.g. `v4.1.2`)
"helpers:pinGitHubActionDigestsToSemver"
],
// Let Renovatebot keep an opened issue that tracks our dependencies
"dependencyDashboard": true,
// Require manual approval from the Dependency Dashboard before opening PRs
"dependencyDashboardApproval": true,
"packageRules": [
{
// No dashboard approval necessary for GitHub Actions updates
"matchManagers": ["github-actions"],
"dependencyDashboardApproval": false
}
],
// Don't manage dependencies inside subtrees. They are updated upstream and
// synced in. See `src/doc/rustc-dev-guide/src/external-repos.md` for the list.
"ignorePaths": [
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
run_type: ${{ steps.jobs.outputs.run_type }}
steps:
- name: Checkout the source code
uses: actions/checkout@v5
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
- name: Test citool
# Only test citool on the auto branch, to reduce latency of the calculate matrix job
# on PR/try builds.
Expand Down Expand Up @@ -117,7 +117,7 @@ jobs:
run: git config --global core.autocrlf false

- name: checkout the source code
uses: actions/checkout@v5
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
with:
fetch-depth: 2

Expand Down Expand Up @@ -254,7 +254,7 @@ jobs:
df -h
- name: upload artifacts to github
uses: actions/upload-artifact@v7
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
# name is set in previous step
name: ${{ env.DOC_ARTIFACT_NAME }}
Expand Down Expand Up @@ -315,7 +315,7 @@ jobs:
environment: ${{ (github.repository == 'rust-lang/rust' && 'bors') || '' }}
steps:
- name: checkout the source code
uses: actions/checkout@v5
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
with:
fetch-depth: 2
# Publish the toolstate if an auto build succeeds (just before push to the default branch)
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
runs-on: ubuntu-24.04
steps:
- name: checkout the source code
uses: actions/checkout@v5
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
with:
submodules: recursive
- name: install the bootstrap toolchain
Expand All @@ -66,7 +66,7 @@ jobs:
run: ./src/tools/update-lockfile.sh

- name: upload Cargo.lock artifact for use in PR
uses: actions/upload-artifact@v7
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
name: Cargo-lock
path: |
Expand All @@ -75,7 +75,7 @@ jobs:
src/tools/rustbook/Cargo.lock
retention-days: 1
- name: upload cargo-update log artifact for use in PR
uses: actions/upload-artifact@v7
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
name: cargo-updates
path: cargo_update.log
Expand All @@ -91,14 +91,14 @@ jobs:
pull-requests: write
steps:
- name: checkout the source code
uses: actions/checkout@v5
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5

- name: download Cargo.lock from update job
uses: actions/download-artifact@v8
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8
with:
name: Cargo-lock
- name: download cargo-update log from update job
uses: actions/download-artifact@v8
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8
with:
name: cargo-updates

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ghcr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
# Needed to write to the ghcr.io registry
packages: write
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
with:
persist-credentials: false

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/post-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
permissions:
pull-requests: write
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
with:
# Make sure that we have enough commits to find the parent merge commit.
# Since all merges should be through merge commits, fetching two commits
Expand Down
39 changes: 36 additions & 3 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -784,6 +784,15 @@ dependencies = [
"cc",
]

[[package]]
name = "cobs"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0fa961b519f0b462e3a3b4a34b64d119eeaca1d59af726fe450bbba07a9fc0a1"
dependencies = [
"thiserror 2.0.17",
]

[[package]]
name = "codespan-reporting"
version = "0.13.1"
Expand Down Expand Up @@ -1330,6 +1339,18 @@ dependencies = [
"stable_deref_trait",
]

[[package]]
name = "embedded-io"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ef1a6892d9eef45c8fa6b9e0086428a2cca8491aca8f787c534a3d6d0bcb3ced"

[[package]]
name = "embedded-io"
version = "0.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "edd0f118536f44f5ccd48bcb8b111bdc3de888b58c74639dfb034a357d0f206d"

[[package]]
name = "ena"
version = "0.14.3"
Expand Down Expand Up @@ -3055,6 +3076,18 @@ dependencies = [
"portable-atomic",
]

[[package]]
name = "postcard"
version = "1.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6764c3b5dd454e283a30e6dfe78e9b31096d9e32036b5d1eaac7a6119ccb9a24"
dependencies = [
"cobs",
"embedded-io 0.4.0",
"embedded-io 0.6.1",
"serde",
]

[[package]]
name = "potential_utf"
version = "0.1.4"
Expand Down Expand Up @@ -4978,7 +5011,7 @@ dependencies = [
name = "rustdoc-json-types"
version = "0.1.0"
dependencies = [
"bincode",
"postcard",
"rkyv",
"rustc-hash 2.1.1",
"serde",
Expand Down Expand Up @@ -5554,9 +5587,9 @@ dependencies = [

[[package]]
name = "thin-vec"
version = "0.2.15"
version = "0.2.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "da322882471314edc77fa5232c587bcb87c9df52bfd0d7d4826f8868ead61899"
checksum = "b0f7e269b48f0a7dd0146680fa24b50cc67fc0373f086a5b2f99bd084639b482"

[[package]]
name = "thiserror"
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_ast/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ rustc_macros = { path = "../rustc_macros" }
rustc_serialize = { path = "../rustc_serialize" }
rustc_span = { path = "../rustc_span" }
smallvec = { version = "1.8.1", features = ["union", "may_dangle"] }
thin-vec = "0.2.15"
thin-vec = "0.2.18"
tracing = "0.1"
# tidy-alphabetical-end
2 changes: 1 addition & 1 deletion compiler/rustc_ast_lowering/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ rustc_session = { path = "../rustc_session" }
rustc_span = { path = "../rustc_span" }
rustc_target = { path = "../rustc_target" }
smallvec = { version = "1.8.1", features = ["union", "may_dangle"] }
thin-vec = "0.2.15"
thin-vec = "0.2.18"
tracing = "0.1"
# tidy-alphabetical-end
2 changes: 1 addition & 1 deletion compiler/rustc_ast_passes/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ rustc_macros = { path = "../rustc_macros" }
rustc_session = { path = "../rustc_session" }
rustc_span = { path = "../rustc_span" }
rustc_target = { path = "../rustc_target" }
thin-vec = "0.2.15"
thin-vec = "0.2.18"
# tidy-alphabetical-end
2 changes: 1 addition & 1 deletion compiler/rustc_ast_pretty/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ rustc_span = { path = "../rustc_span" }

[dev-dependencies]
# tidy-alphabetical-start
thin-vec = "0.2.15"
thin-vec = "0.2.18"
# tidy-alphabetical-end
2 changes: 1 addition & 1 deletion compiler/rustc_attr_parsing/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ rustc_parse_format = { path = "../rustc_parse_format" }
rustc_session = { path = "../rustc_session" }
rustc_span = { path = "../rustc_span" }
rustc_target = { path = "../rustc_target" }
thin-vec = "0.2.15"
thin-vec = "0.2.18"
# tidy-alphabetical-end
8 changes: 2 additions & 6 deletions compiler/rustc_attr_parsing/src/attributes/doc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ use crate::diagnostics::{
use crate::parser::{ArgParser, MetaItemOrLitParser, MetaItemParser, OwnedPathParser};
use crate::session_diagnostics::{
DocAliasBadChar, DocAliasEmpty, DocAliasMalformed, DocAliasStartEnd, DocAttrNotCrateLevel,
DocAttributeNotAttribute, DocKeywordNotKeyword,
DocAttributeNotAttribute, DocKeywordNotKeyword, UnusedDuplicate,
};

fn check_keyword(cx: &mut AcceptContext<'_, '_>, keyword: Symbol, span: Span) -> bool {
Expand Down Expand Up @@ -159,11 +159,7 @@ impl DocParser {
let unused_span = path.span();
cx.emit_lint(
rustc_session::lint::builtin::INVALID_DOC_ATTRIBUTES,
rustc_errors::lints::UnusedDuplicate {
this: unused_span,
other: used_span,
warning: true,
},
UnusedDuplicate { this: unused_span, other: used_span, warning: true },
unused_span,
);
return;
Expand Down
29 changes: 29 additions & 0 deletions compiler/rustc_attr_parsing/src/attributes/rustc_dump.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,35 @@ impl SingleAttributeParser for RustcDumpDefPathParser {
}
}

pub(crate) struct RustcDumpGenericsParser;

impl NoArgsAttributeParser for RustcDumpGenericsParser {
const PATH: &[Symbol] = &[sym::rustc_dump_generics];
const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::AllowList(&[
Allow(Target::Struct),
Allow(Target::Enum),
Allow(Target::Union),
Allow(Target::Trait),
Allow(Target::TraitAlias),
Allow(Target::Fn),
Allow(Target::Closure),
Allow(Target::TyAlias),
Allow(Target::Const),
Allow(Target::AssocConst),
Allow(Target::AssocTy),
Allow(Target::Impl { of_trait: false }),
Allow(Target::Impl { of_trait: true }),
Allow(Target::Method(MethodKind::Inherent)),
Allow(Target::Method(MethodKind::Trait { body: false })),
Allow(Target::Method(MethodKind::Trait { body: true })),
Allow(Target::Method(MethodKind::TraitImpl)),
Allow(Target::Delegation { mac: false }),
Allow(Target::Delegation { mac: true }),
]);
const STABILITY: AttributeStability = unstable!(rustc_attrs);
const CREATE: fn(Span) -> AttributeKind = |_| AttributeKind::RustcDumpGenerics;
}

pub(crate) struct RustcDumpHiddenTypeOfOpaquesParser;

impl NoArgsAttributeParser for RustcDumpHiddenTypeOfOpaquesParser {
Expand Down
15 changes: 4 additions & 11 deletions compiler/rustc_attr_parsing/src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ use crate::parser::{
};
use crate::session_diagnostics::{
AttributeParseError, AttributeParseErrorReason, AttributeParseErrorSuggestions,
ParsedDescription,
ParsedDescription, UnusedDuplicate,
};
use crate::target_checking::AllowedTargets;
use crate::{AttrSuggestionStyle, AttributeParser, AttributeTemplate, EmitAttribute};
Expand Down Expand Up @@ -283,6 +283,7 @@ attribute_parsers!(
Single<WithoutArgs<RustcDenyExplicitImplParser>>,
Single<WithoutArgs<RustcDoNotConstCheckParser>>,
Single<WithoutArgs<RustcDumpDefParentsParser>>,
Single<WithoutArgs<RustcDumpGenericsParser>>,
Single<WithoutArgs<RustcDumpHiddenTypeOfOpaquesParser>>,
Single<WithoutArgs<RustcDumpInferredOutlivesParser>>,
Single<WithoutArgs<RustcDumpItemBoundsParser>>,
Expand Down Expand Up @@ -436,11 +437,7 @@ impl<'f, 'sess: 'f> SharedContext<'f, 'sess> {
pub(crate) fn warn_unused_duplicate(&mut self, used_span: Span, unused_span: Span) {
self.emit_lint(
rustc_session::lint::builtin::UNUSED_ATTRIBUTES,
rustc_errors::lints::UnusedDuplicate {
this: unused_span,
other: used_span,
warning: false,
},
UnusedDuplicate { this: unused_span, other: used_span, warning: false },
unused_span,
)
}
Expand All @@ -452,11 +449,7 @@ impl<'f, 'sess: 'f> SharedContext<'f, 'sess> {
) {
self.emit_lint(
rustc_session::lint::builtin::UNUSED_ATTRIBUTES,
rustc_errors::lints::UnusedDuplicate {
this: unused_span,
other: used_span,
warning: true,
},
UnusedDuplicate { this: unused_span, other: used_span, warning: true },
unused_span,
)
}
Expand Down
13 changes: 13 additions & 0 deletions compiler/rustc_attr_parsing/src/session_diagnostics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1045,3 +1045,16 @@ pub(crate) struct AdditionalCommaSuggestion {
#[primary_span]
pub span: Span,
}

#[derive(Diagnostic)]
#[diag("unused attribute")]
pub(crate) struct UnusedDuplicate {
#[suggestion("remove this attribute", code = "", applicability = "machine-applicable")]
pub this: Span,
#[note("attribute also specified here")]
pub other: Span,
#[warning(
"this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!"
)]
pub warning: bool,
}
Loading