Repository navigation
New const traits syntax - #139858
Merged
Merged
New const traits syntax#139858
Conversation
Collaborator
|
Some changes occurred in src/tools/rustfmt cc @rust-lang/rustfmt Some changes occurred in src/tools/clippy cc @rust-lang/clippy |
oli-obk
commented
Apr 15, 2025
oli-obk
force-pushed
the
new-const-traits-syntax
branch
from
April 15, 2025 09:04
f6be056 to
2003458
Compare
This comment has been minimized.
This comment has been minimized.
oli-obk
force-pushed
the
new-const-traits-syntax
branch
from
April 15, 2025 09:51
2003458 to
d6da247
Compare
This comment was marked as outdated.
This comment was marked as outdated.
This comment has been minimized.
This comment has been minimized.
oli-obk
force-pushed
the
new-const-traits-syntax
branch
from
April 15, 2025 12:38
d6da247 to
e16c40b
Compare
traviscross
reviewed
Apr 16, 2025
oli-obk
force-pushed
the
new-const-traits-syntax
branch
from
April 17, 2025 09:06
e16c40b to
234ba91
Compare
This comment has been minimized.
This comment has been minimized.
oli-obk
force-pushed
the
new-const-traits-syntax
branch
from
April 17, 2025 13:04
234ba91 to
ef1acde
Compare
flip1995
reviewed
Apr 29, 2025
oli-obk
force-pushed
the
new-const-traits-syntax
branch
from
April 29, 2025 09:04
ef1acde to
5fa25d4
Compare
This comment has been minimized.
This comment has been minimized.
oli-obk
force-pushed
the
new-const-traits-syntax
branch
from
April 29, 2025 09:55
5fa25d4 to
7762468
Compare
Contributor
|
☔ The latest upstream changes (presumably #140695) made this pull request unmergeable. Please resolve the merge conflicts. |
Contributor
|
Have we actually settled on a syntax here? Sorry for punting it back over, but would like to get an update here if it's actually ready to review :> ping me when it's ready, sorry for the delays! @rustbot author |
Collaborator
|
Reminder, once the PR becomes ready for a review, use |
Contributor
No. Discussion is ongoing. |
Contributor
|
This affects a lot of tests but I don't expect it to fail, except if there's an untested doc test or something. @bors rollup=iffy |
compiler-errors
added a commit
to compiler-errors/rust
that referenced
this pull request
Jun 27, 2025
…=fee1-dead New const traits syntax This PR only affects the AST and doesn't actually change anything semantically. All occurrences of `~const` outside of libcore have been replaced by `[const]`. Within libcore we have to wait for rustfmt to be bumped in the bootstrap compiler. This will happen "automatically" (when rustfmt is run) during the bootstrap bump, as rustfmt converts `~const` into `[const]`. After this we can remove the `~const` support from the parser Caveat discovered during impl: there is no legacy bare trait object recovery for `[const] Trait` as that snippet in type position goes down the slice /array parsing code and will error r? `@fee1-dead` cc `@nikomatsakis` `@traviscross` `@compiler-errors`
bors
added a commit
that referenced
this pull request
Jun 27, 2025
…rors Rollup of 8 pull requests Successful merges: - #139858 (New const traits syntax) - #140809 (Reduce special casing for the panic runtime) - #142963 (Skip unnecessary components in x64 try builds) - #142974 (Update stage0 to 1.89.0-beta.1) - #142987 (rustdoc: show attributes on enum variants) - #143002 (tests: Require `run-fail` ui tests to have an exit code (`SIGABRT` not ok)) - #143092 (const checks for lifetime-extended temporaries: avoid 'top-level scope' terminology) - #143096 (tag_for_variant: properly pass TypingEnv) r? `@ghost` `@rustbot` modify labels: rollup
bors
added a commit
that referenced
this pull request
Jun 27, 2025
Rollup of 9 pull requests Successful merges: - #139858 (New const traits syntax) - #140809 (Reduce special casing for the panic runtime) - #142730 (suggest declaring modules when file found but module not defined) - #142806 (Normalize before computing ConstArgHasType goal in new solver) - #143046 (const validation: properly ignore zero-sized UnsafeCell) - #143092 (const checks for lifetime-extended temporaries: avoid 'top-level scope' terminology) - #143096 (tag_for_variant: properly pass TypingEnv) - #143104 (hir_analysis: prohibit `dyn PointeeSized`) - #143106 (gce: don't ICE on non-local const) Failed merges: - #143036 (Remove support for `dyn*` from the compiler) r? `@ghost` `@rustbot` modify labels: rollup
Contributor
rust-timer
added a commit
that referenced
this pull request
Jun 28, 2025
Rollup merge of #139858 - oli-obk:new-const-traits-syntax, r=fee1-dead New const traits syntax This PR only affects the AST and doesn't actually change anything semantically. All occurrences of `~const` outside of libcore have been replaced by `[const]`. Within libcore we have to wait for rustfmt to be bumped in the bootstrap compiler. This will happen "automatically" (when rustfmt is run) during the bootstrap bump, as rustfmt converts `~const` into `[const]`. After this we can remove the `~const` support from the parser Caveat discovered during impl: there is no legacy bare trait object recovery for `[const] Trait` as that snippet in type position goes down the slice /array parsing code and will error r? ``@fee1-dead`` cc ``@nikomatsakis`` ``@traviscross`` ``@compiler-errors``
github-actions Bot
pushed a commit
to rust-lang/miri
that referenced
this pull request
Jun 28, 2025
Rollup of 9 pull requests Successful merges: - rust-lang/rust#139858 (New const traits syntax) - rust-lang/rust#140809 (Reduce special casing for the panic runtime) - rust-lang/rust#142730 (suggest declaring modules when file found but module not defined) - rust-lang/rust#142806 (Normalize before computing ConstArgHasType goal in new solver) - rust-lang/rust#143046 (const validation: properly ignore zero-sized UnsafeCell) - rust-lang/rust#143092 (const checks for lifetime-extended temporaries: avoid 'top-level scope' terminology) - rust-lang/rust#143096 (tag_for_variant: properly pass TypingEnv) - rust-lang/rust#143104 (hir_analysis: prohibit `dyn PointeeSized`) - rust-lang/rust#143106 (gce: don't ICE on non-local const) Failed merges: - rust-lang/rust#143036 (Remove support for `dyn*` from the compiler) r? `@ghost` `@rustbot` modify labels: rollup
flip1995
pushed a commit
to flip1995/rust-clippy
that referenced
this pull request
Jul 10, 2025
Rollup of 9 pull requests Successful merges: - rust-lang/rust#139858 (New const traits syntax) - rust-lang/rust#140809 (Reduce special casing for the panic runtime) - rust-lang/rust#142730 (suggest declaring modules when file found but module not defined) - rust-lang/rust#142806 (Normalize before computing ConstArgHasType goal in new solver) - rust-lang/rust#143046 (const validation: properly ignore zero-sized UnsafeCell) - rust-lang/rust#143092 (const checks for lifetime-extended temporaries: avoid 'top-level scope' terminology) - rust-lang/rust#143096 (tag_for_variant: properly pass TypingEnv) - rust-lang/rust#143104 (hir_analysis: prohibit `dyn PointeeSized`) - rust-lang/rust#143106 (gce: don't ICE on non-local const) Failed merges: - rust-lang/rust#143036 (Remove support for `dyn*` from the compiler) r? `@ghost` `@rustbot` modify labels: rollup
flip1995
pushed a commit
to flip1995/rust
that referenced
this pull request
Jul 10, 2025
…=fee1-dead New const traits syntax This PR only affects the AST and doesn't actually change anything semantically. All occurrences of `~const` outside of libcore have been replaced by `[const]`. Within libcore we have to wait for rustfmt to be bumped in the bootstrap compiler. This will happen "automatically" (when rustfmt is run) during the bootstrap bump, as rustfmt converts `~const` into `[const]`. After this we can remove the `~const` support from the parser Caveat discovered during impl: there is no legacy bare trait object recovery for `[const] Trait` as that snippet in type position goes down the slice /array parsing code and will error r? ``@fee1-dead`` cc ``@nikomatsakis`` ``@traviscross`` ``@compiler-errors``
This was referenced Aug 13, 2025
dhruvmanila
pushed a commit
to astral-sh/ruff
that referenced
this pull request
Aug 25, 2025
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [syn](https://redirect.github.com/dtolnay/syn) | workspace.dependencies | patch | `2.0.104` -> `2.0.106` | --- > [!WARNING] > Some dependencies could not be looked up. Check the Dependency Dashboard for more information. --- ### Release Notes <details> <summary>dtolnay/syn (syn)</summary> ### [`v2.0.106`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.106) [Compare Source](https://redirect.github.com/dtolnay/syn/compare/2.0.105...2.0.106) - Replace `~const` syntax with `[const]` conditionally const syntax in trait bounds ([#​1896](https://redirect.github.com/dtolnay/syn/issues/1896), [rust-lang/rust#139858](https://redirect.github.com/rust-lang/rust/pull/139858)) - Support conditionally const impl Trait types ([#​1897](https://redirect.github.com/dtolnay/syn/issues/1897)) - Reject polarity modifier and lifetime binder used in the same trait bound ([#​1899](https://redirect.github.com/dtolnay/syn/issues/1899), [rust-lang/rust#127054](https://redirect.github.com/rust-lang/rust/pull/127054)) - Parse const trait bounds with bound lifetimes ([#​1902](https://redirect.github.com/dtolnay/syn/issues/1902)) - Parse bound lifetimes with lifetime bounds ([#​1903](https://redirect.github.com/dtolnay/syn/issues/1903)) - Allow type parameters and const parameters in trait bounds and generic closures ([#​1904](https://redirect.github.com/dtolnay/syn/issues/1904), [#​1907](https://redirect.github.com/dtolnay/syn/issues/1907), [#​1908](https://redirect.github.com/dtolnay/syn/issues/1908), [#​1909](https://redirect.github.com/dtolnay/syn/issues/1909)) ### [`v2.0.105`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.105) [Compare Source](https://redirect.github.com/dtolnay/syn/compare/2.0.104...2.0.105) - Disallow "negative" inherent impls like `impl !T {}` ([#​1881](https://redirect.github.com/dtolnay/syn/issues/1881), [rust-lang/rust#144386](https://redirect.github.com/rust-lang/rust/pull/144386)) </details> --- ### Configuration 📅 **Schedule**: Branch creation - "before 4am on Monday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/astral-sh/ruff). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MS44Mi43IiwidXBkYXRlZEluVmVyIjoiNDEuODIuNyIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiaW50ZXJuYWwiXX0=--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
konstin
pushed a commit
to astral-sh/uv
that referenced
this pull request
Aug 25, 2025
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [syn](https://redirect.github.com/dtolnay/syn) | workspace.dependencies | patch | `2.0.104` -> `2.0.106` | --- > [!WARNING] > Some dependencies could not be looked up. Check the Dependency Dashboard for more information. --- ### Release Notes <details> <summary>dtolnay/syn (syn)</summary> ### [`v2.0.106`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.106) [Compare Source](https://redirect.github.com/dtolnay/syn/compare/2.0.105...2.0.106) - Replace `~const` syntax with `[const]` conditionally const syntax in trait bounds ([#​1896](https://redirect.github.com/dtolnay/syn/issues/1896), [rust-lang/rust#139858](https://redirect.github.com/rust-lang/rust/pull/139858)) - Support conditionally const impl Trait types ([#​1897](https://redirect.github.com/dtolnay/syn/issues/1897)) - Reject polarity modifier and lifetime binder used in the same trait bound ([#​1899](https://redirect.github.com/dtolnay/syn/issues/1899), [rust-lang/rust#127054](https://redirect.github.com/rust-lang/rust/pull/127054)) - Parse const trait bounds with bound lifetimes ([#​1902](https://redirect.github.com/dtolnay/syn/issues/1902)) - Parse bound lifetimes with lifetime bounds ([#​1903](https://redirect.github.com/dtolnay/syn/issues/1903)) - Allow type parameters and const parameters in trait bounds and generic closures ([#​1904](https://redirect.github.com/dtolnay/syn/issues/1904), [#​1907](https://redirect.github.com/dtolnay/syn/issues/1907), [#​1908](https://redirect.github.com/dtolnay/syn/issues/1908), [#​1909](https://redirect.github.com/dtolnay/syn/issues/1909)) ### [`v2.0.105`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.105) [Compare Source](https://redirect.github.com/dtolnay/syn/compare/2.0.104...2.0.105) - Disallow "negative" inherent impls like `impl !T {}` ([#​1881](https://redirect.github.com/dtolnay/syn/issues/1881), [rust-lang/rust#144386](https://redirect.github.com/rust-lang/rust/pull/144386)) </details> --- ### Configuration 📅 **Schedule**: Branch creation - "before 4am on Monday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/astral-sh/uv). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MS44Mi43IiwidXBkYXRlZEluVmVyIjoiNDEuODIuNyIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiaW50ZXJuYWwiXX0=--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
second-ed
pushed a commit
to second-ed/ruff
that referenced
this pull request
Sep 9, 2025
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [syn](https://redirect.github.com/dtolnay/syn) | workspace.dependencies | patch | `2.0.104` -> `2.0.106` | --- > [!WARNING] > Some dependencies could not be looked up. Check the Dependency Dashboard for more information. --- ### Release Notes <details> <summary>dtolnay/syn (syn)</summary> ### [`v2.0.106`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.106) [Compare Source](https://redirect.github.com/dtolnay/syn/compare/2.0.105...2.0.106) - Replace `~const` syntax with `[const]` conditionally const syntax in trait bounds ([#&astral-sh#8203;1896](https://redirect.github.com/dtolnay/syn/issues/1896), [rust-lang/rust#139858](https://redirect.github.com/rust-lang/rust/pull/139858)) - Support conditionally const impl Trait types ([#&astral-sh#8203;1897](https://redirect.github.com/dtolnay/syn/issues/1897)) - Reject polarity modifier and lifetime binder used in the same trait bound ([#&astral-sh#8203;1899](https://redirect.github.com/dtolnay/syn/issues/1899), [rust-lang/rust#127054](https://redirect.github.com/rust-lang/rust/pull/127054)) - Parse const trait bounds with bound lifetimes ([#&astral-sh#8203;1902](https://redirect.github.com/dtolnay/syn/issues/1902)) - Parse bound lifetimes with lifetime bounds ([#&astral-sh#8203;1903](https://redirect.github.com/dtolnay/syn/issues/1903)) - Allow type parameters and const parameters in trait bounds and generic closures ([#&astral-sh#8203;1904](https://redirect.github.com/dtolnay/syn/issues/1904), [#&astral-sh#8203;1907](https://redirect.github.com/dtolnay/syn/issues/1907), [#&astral-sh#8203;1908](https://redirect.github.com/dtolnay/syn/issues/1908), [#&astral-sh#8203;1909](https://redirect.github.com/dtolnay/syn/issues/1909)) ### [`v2.0.105`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.105) [Compare Source](https://redirect.github.com/dtolnay/syn/compare/2.0.104...2.0.105) - Disallow "negative" inherent impls like `impl !T {}` ([#&astral-sh#8203;1881](https://redirect.github.com/dtolnay/syn/issues/1881), [rust-lang/rust#144386](https://redirect.github.com/rust-lang/rust/pull/144386)) </details> --- ### Configuration 📅 **Schedule**: Branch creation - "before 4am on Monday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/astral-sh/ruff). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MS44Mi43IiwidXBkYXRlZEluVmVyIjoiNDEuODIuNyIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiaW50ZXJuYWwiXX0=--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
rust-bors Bot
pushed a commit
that referenced
this pull request
Feb 27, 2026
New const traits syntax This PR only affects the AST and doesn't actually change anything semantically. All occurrences of `~const` outside of libcore have been replaced by `[const]`. Within libcore we have to wait for rustfmt to be bumped in the bootstrap compiler. This will happen "automatically" (when rustfmt is run) during the bootstrap bump, as rustfmt converts `~const` into `[const]`. After this we can remove the `~const` support from the parser Caveat discovered during impl: there is no legacy bare trait object recovery for `[const] Trait` as that snippet in type position goes down the slice /array parsing code and will error r? ``@fee1-dead`` cc ``@nikomatsakis`` ``@traviscross`` ``@compiler-errors``
JonathanBrouwer
added a commit
to JonathanBrouwer/rust
that referenced
this pull request
Mar 9, 2026
…r=fmease Ping fmease on parser modifications From time to time innocuous-seeming PRs get submitted and sometimes even approved that unbeknownst to their author and to reviewers change the grammar of (stable) Rust which would be a breaking change; often they only meant to tweak diagnostics. I sometimes catch such PRs before they get merged but I want to make it a lot harder for them to slip through the cracks going forward. I'm going to list recent examples to paint a picture (note: this is not about blame!): 1. rust-lang#149728 (review) (2026) * caught before merge but after approval * PR unapproved for now 2. rust-lang#152501 (2026) * caught after merge of rust-lang#149489 * fixed & backported 3. rust-lang#152499 (2026) * caught after merge of rust-lang#149667 * fixed & backported 4. rust-lang#151960 (comment) (2026) * caught right after submission * the approach was thus changed 5. rust-lang#148238 (2025) * caught after merge of rust-lang#118947 * still unaddressed 6. rust-lang#144386 (review) (2025) * caught right after submission * crater & T-lang were activated by me 7. rust-lang#119042 (comment) (2023) * caught right after submission * the approach was thus changed 8. rust-lang#103534 (2022) * caught way later * partially addressed Why not just post a note without pinging me? Well, due to them not failing CI and generally due to (friendly) botspam, such comments just get lost or sometimes even actively ignored. Of course, I'm not able to catch everything. E.g., I didn't notice issue rust-lang#146417 before PR rust-lang#139858 was merged despite having skimmed its diff and more importantly, I as a reviewer missed the blatantly obvious rust-lang#144958 before merge. Separately, off and on over the span of one year I've worked on a Rust parser that now has >99% accuracy/parity with rustc according to some metrics (this includes stable + unstable + internal syntax) and which I'm using to detect such regressions and issues in general among other things (e.g., rust-lang#152499 and rust-lang#152820 were found this way, more to come). I'm pretty invested, let's say. r? me
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this pull request
Mar 9, 2026
…r=fmease Ping fmease on parser modifications From time to time innocuous-seeming PRs get submitted and sometimes even approved that unbeknownst to their author and to reviewers change the grammar of (stable) Rust which would be a breaking change; often they only meant to tweak diagnostics. I sometimes catch such PRs before they get merged but I want to make it a lot harder for them to slip through the cracks going forward. I'm going to list recent examples to paint a picture (note: this is not about blame!): 1. rust-lang#149728 (review) (2026) * caught before merge but after approval * PR unapproved for now 2. rust-lang#152501 (2026) * caught after merge of rust-lang#149489 * fixed & backported 3. rust-lang#152499 (2026) * caught after merge of rust-lang#149667 * fixed & backported 4. rust-lang#151960 (comment) (2026) * caught right after submission * the approach was thus changed 5. rust-lang#148238 (2025) * caught after merge of rust-lang#118947 * still unaddressed 6. rust-lang#144386 (review) (2025) * caught right after submission * crater & T-lang were activated by me 7. rust-lang#119042 (comment) (2023) * caught right after submission * the approach was thus changed 8. rust-lang#103534 (2022) * caught way later * partially addressed Why not just post a note without pinging me? Well, due to them not failing CI and generally due to (friendly) botspam, such comments just get lost or sometimes even actively ignored. Of course, I'm not able to catch everything. E.g., I didn't notice issue rust-lang#146417 before PR rust-lang#139858 was merged despite having skimmed its diff and more importantly, I as a reviewer missed the blatantly obvious rust-lang#144958 before merge. Separately, off and on over the span of one year I've worked on a Rust parser that now has >99% accuracy/parity with rustc according to some metrics (this includes stable + unstable + internal syntax) and which I'm using to detect such regressions and issues in general among other things (e.g., rust-lang#152499 and rust-lang#152820 were found this way, more to come). I'm pretty invested, let's say. r? me
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this pull request
Mar 9, 2026
…r=fmease Ping fmease on parser modifications From time to time innocuous-seeming PRs get submitted and sometimes even approved that unbeknownst to their author and to reviewers change the grammar of (stable) Rust which would be a breaking change; often they only meant to tweak diagnostics. I sometimes catch such PRs before they get merged but I want to make it a lot harder for them to slip through the cracks going forward. I'm going to list recent examples to paint a picture (note: this is not about blame!): 1. rust-lang#149728 (review) (2026) * caught before merge but after approval * PR unapproved for now 2. rust-lang#152501 (2026) * caught after merge of rust-lang#149489 * fixed & backported 3. rust-lang#152499 (2026) * caught after merge of rust-lang#149667 * fixed & backported 4. rust-lang#151960 (comment) (2026) * caught right after submission * the approach was thus changed 5. rust-lang#148238 (2025) * caught after merge of rust-lang#118947 * still unaddressed 6. rust-lang#144386 (review) (2025) * caught right after submission * crater & T-lang were activated by me 7. rust-lang#119042 (comment) (2023) * caught right after submission * the approach was thus changed 8. rust-lang#103534 (2022) * caught way later * partially addressed Why not just post a note without pinging me? Well, due to them not failing CI and generally due to (friendly) botspam, such comments just get lost or sometimes even actively ignored. Of course, I'm not able to catch everything. E.g., I didn't notice issue rust-lang#146417 before PR rust-lang#139858 was merged despite having skimmed its diff and more importantly, I as a reviewer missed the blatantly obvious rust-lang#144958 before merge. Separately, off and on over the span of one year I've worked on a Rust parser that now has >99% accuracy/parity with rustc according to some metrics (this includes stable + unstable + internal syntax) and which I'm now using to detect such regressions and issues in general among other things (e.g., rust-lang#152499 and rust-lang#152820 were found this way, more to come). I'm pretty invested, let's say. r? me
rust-timer
added a commit
that referenced
this pull request
Mar 10, 2026
Rollup merge of #153624 - fmease:ping-me-on-parser-changes, r=fmease Ping fmease on parser modifications From time to time innocuous-seeming PRs get submitted and sometimes even approved that unbeknownst to their author and to reviewers change the grammar of (stable) Rust which would be a breaking change; often they only meant to tweak diagnostics. I sometimes catch such PRs before they get merged but I want to make it a lot harder for them to slip through the cracks going forward. I'm going to list recent examples to paint a picture (note: this is not about blame!): 1. #149728 (review) (2026) * caught before merge but after approval * PR unapproved for now 2. #152501 (2026) * caught after merge of #149489 * fixed & backported 3. #152499 (2026) * caught after merge of #149667 * fixed & backported 4. #151960 (comment) (2026) * caught right after submission * the approach was thus changed 5. #148238 (2025) * caught after merge of #118947 * still unaddressed 6. #144386 (review) (2025) * caught right after submission * crater & T-lang were activated by me 7. #119042 (comment) (2023) * caught right after submission * the approach was thus changed 8. #103534 (2022) * caught way later * partially addressed Why not just post a note without pinging me? Well, due to them not failing CI and generally due to (friendly) botspam, such comments just get lost or sometimes even actively ignored. Of course, I'm not able to catch everything. E.g., I didn't notice issue #146417 before PR #139858 was merged despite having skimmed its diff and more importantly, I as a reviewer missed the blatantly obvious #144958 before merge. Separately, off and on over the span of one year I've worked on a Rust parser that now has >99% accuracy/parity with rustc according to some metrics (this includes stable + unstable + internal syntax) and which I'm now using to detect such regressions and issues in general among other things (e.g., #152499 and #152820 were found this way, more to come). I'm pretty invested, let's say. r? me
KotlinIsland
pushed a commit
to KotlinIsland/basedpython
that referenced
this pull request
May 1, 2026
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [syn](https://redirect.github.com/dtolnay/syn) | workspace.dependencies | patch | `2.0.104` -> `2.0.106` | --- > [!WARNING] > Some dependencies could not be looked up. Check the Dependency Dashboard for more information. --- ### Release Notes <details> <summary>dtolnay/syn (syn)</summary> ### [`v2.0.106`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.106) [Compare Source](https://redirect.github.com/dtolnay/syn/compare/2.0.105...2.0.106) - Replace `~const` syntax with `[const]` conditionally const syntax in trait bounds ([#​1896](https://redirect.github.com/dtolnay/syn/issues/1896), [rust-lang/rust#139858](https://redirect.github.com/rust-lang/rust/pull/139858)) - Support conditionally const impl Trait types ([#​1897](https://redirect.github.com/dtolnay/syn/issues/1897)) - Reject polarity modifier and lifetime binder used in the same trait bound ([#​1899](https://redirect.github.com/dtolnay/syn/issues/1899), [rust-lang/rust#127054](https://redirect.github.com/rust-lang/rust/pull/127054)) - Parse const trait bounds with bound lifetimes ([#​1902](https://redirect.github.com/dtolnay/syn/issues/1902)) - Parse bound lifetimes with lifetime bounds ([#​1903](https://redirect.github.com/dtolnay/syn/issues/1903)) - Allow type parameters and const parameters in trait bounds and generic closures ([#​1904](https://redirect.github.com/dtolnay/syn/issues/1904), [#​1907](https://redirect.github.com/dtolnay/syn/issues/1907), [#​1908](https://redirect.github.com/dtolnay/syn/issues/1908), [#​1909](https://redirect.github.com/dtolnay/syn/issues/1909)) ### [`v2.0.105`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.105) [Compare Source](https://redirect.github.com/dtolnay/syn/compare/2.0.104...2.0.105) - Disallow "negative" inherent impls like `impl !T {}` ([#​1881](https://redirect.github.com/dtolnay/syn/issues/1881), [rust-lang/rust#144386](https://redirect.github.com/rust-lang/rust/pull/144386)) </details> --- ### Configuration 📅 **Schedule**: Branch creation - "before 4am on Monday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/astral-sh/ruff). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MS44Mi43IiwidXBkYXRlZEluVmVyIjoiNDEuODIuNyIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiaW50ZXJuYWwiXX0=--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
bhouse-nexthop
pushed a commit
to sonic-net/sonic-dash-ha
that referenced
this pull request
Nov 18, 2026
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [syn](https://redirect.github.com/dtolnay/syn) | dependencies | major | `2.0` → `3.0` | --- ### Release Notes <details> <summary>dtolnay/syn (syn)</summary> ### [`v3.0.10`](https://redirect.github.com/dtolnay/syn/releases/tag/3.0.10) [Compare Source](https://redirect.github.com/dtolnay/syn/compare/3.0.9...3.0.10) - Skip rescanning operands whose scan already failed ([#​2090](https://redirect.github.com/dtolnay/syn/issues/2090), thanks [@​LucaCappelletti94](https://redirect.github.com/LucaCappelletti94)) ### [`v3.0.9`](https://redirect.github.com/dtolnay/syn/releases/tag/3.0.9) [Compare Source](https://redirect.github.com/dtolnay/syn/compare/3.0.8...3.0.9) - Add Punctuated::retain ([#​2088](https://redirect.github.com/dtolnay/syn/issues/2088)) ### [`v3.0.8`](https://redirect.github.com/dtolnay/syn/releases/tag/3.0.8) [Compare Source](https://redirect.github.com/dtolnay/syn/compare/3.0.7...3.0.8) - Fix parsing of `<-` and `->` tokens in expressions ([#​2086](https://redirect.github.com/dtolnay/syn/issues/2086), [#​2087](https://redirect.github.com/dtolnay/syn/issues/2087)) ### [`v3.0.7`](https://redirect.github.com/dtolnay/syn/releases/tag/3.0.7) [Compare Source](https://redirect.github.com/dtolnay/syn/compare/3.0.6...3.0.7) - Fix parsing absolute path expr in labeled break ([#​2085](https://redirect.github.com/dtolnay/syn/issues/2085), thanks [@​A4-Tacks](https://redirect.github.com/A4-Tacks)) ### [`v3.0.6`](https://redirect.github.com/dtolnay/syn/releases/tag/3.0.6) [Compare Source](https://redirect.github.com/dtolnay/syn/compare/3.0.5...3.0.6) - Fix parsing interpolated lifetime at statement start ([#​2082](https://redirect.github.com/dtolnay/syn/issues/2082)) ### [`v3.0.5`](https://redirect.github.com/dtolnay/syn/releases/tag/3.0.5) [Compare Source](https://redirect.github.com/dtolnay/syn/compare/3.0.4...3.0.5) - Report correct span for lex errors from `LitStr::parse_with` ([#​2080](https://redirect.github.com/dtolnay/syn/issues/2080), thanks [@​sunshowers](https://redirect.github.com/sunshowers)) ### [`v3.0.4`](https://redirect.github.com/dtolnay/syn/releases/tag/3.0.4) [Compare Source](https://redirect.github.com/dtolnay/syn/compare/3.0.3...3.0.4) - Allow `safe fn` in `impl Parse for ForeignItemFn` ([#​2078](https://redirect.github.com/dtolnay/syn/issues/2078)) ### [`v3.0.3`](https://redirect.github.com/dtolnay/syn/releases/tag/3.0.3) [Compare Source](https://redirect.github.com/dtolnay/syn/compare/3.0.2...3.0.3) - Documentation improvements ### [`v3.0.2`](https://redirect.github.com/dtolnay/syn/releases/tag/3.0.2) [Compare Source](https://redirect.github.com/dtolnay/syn/compare/3.0.1...3.0.2) - Add [`Error::new_range(start..end, "msg")`](https://docs.rs/syn/3/syn/struct.Error.html#method.new_range) ([#​2068](https://redirect.github.com/dtolnay/syn/issues/2068), [#​2070](https://redirect.github.com/dtolnay/syn/issues/2070)) - Add [`Cursor::prev_span`](https://docs.rs/syn/3/syn/buffer/struct.Cursor.html#method.prev_span) ### [`v3.0.1`](https://redirect.github.com/dtolnay/syn/releases/tag/3.0.1) [Compare Source](https://redirect.github.com/dtolnay/syn/compare/3.0.0...3.0.1) - Parse const traits ([#​2056](https://redirect.github.com/dtolnay/syn/issues/2056), [#​2057](https://redirect.github.com/dtolnay/syn/issues/2057), [#​2058](https://redirect.github.com/dtolnay/syn/issues/2058), [#​2063](https://redirect.github.com/dtolnay/syn/issues/2063), [#​2064](https://redirect.github.com/dtolnay/syn/issues/2064)) - Parse unsafe binder types ([#​2065](https://redirect.github.com/dtolnay/syn/issues/2065)) - Parse impl restrictions ([#​2066](https://redirect.github.com/dtolnay/syn/issues/2066)) ### [`v3.0.0`](https://redirect.github.com/dtolnay/syn/releases/tag/3.0.0) [Compare Source](https://redirect.github.com/dtolnay/syn/compare/2.0.119...3.0.0) This release contains adjustments to the syntax tree to account for ongoing Rust language development from the 3 years since syn 2.0.0 and to anticipate some in-flight Rust language RFCs. These include: default values in fields, pinned type sugar, raw lifetimes, generator blocks and functions, unnamed enum variants, attributes in tuple types and tuple patterns, named arguments in parenthesized generic argument lists, lightweight clones, const traits, const function pointers, mutability restricted fields, supertrait auto implementation, final associated functions, trait implementability restrictions, const blocks in path arguments, item-level const blocks, return type notation, never patterns, function delegation, mutable by-reference bindings, in-place initialization, field projections, explicitly dyn-compatible traits, view types, file-level frontmatter, generic const arguments, guard patterns, lazy type aliases, explicitly safe foreign items, super let, unsafe fields, pattern types, heterogeneous try-blocks, function contracts, async function trait bounds, static closure coroutine syntax, unsafe binder types, move expressions, for-await loops, and postfix keywords. <br> <p align="center"><a href="https://docs.rs/syn/3/syn">[API documentation for 3.0]</a></p> ### Breaking changes #### Modifiers To reserve more room for language evolution, there are 10 new non-exhaustive structs in the syntax tree having the following commonality: - Name ending in `Modifiers`. {`BlockModifiers`, `ClosureModifiers`, `ConstModifiers`, `FieldModifiers`, `FnModifiers`, `ImplModifiers`, `LocalModifiers`, `TraitBoundModifiers`, `TraitModifiers`, `TypeModifiers`} - Each implements `Default`. The default value is guaranteed to comprise no tokens. - Non-exhaustive. Can only be instantiated by Syn's parser or by creating and then mutating `▁▁Modifiers::default()`. - Does not implement `Parse`. When parsing, they are parsed by the enclosing syntax tree node. - Does not implement `ToTokens`. In some cases the syntax that these nodes might hold in the future is not necessarily contiguous tokens. - Provides `.require_empty() -> Result<()>` which returns a meaningfully spanned error if the modifiers are different from the empty default. This enables a caller to reject syntax it does not recognize without knowing what that syntax may be. #### Types - `Type::BareFn` has been renamed to `Type::FnPtr` to mirror the compiler's terminology. Together with this, `BareVariadic` is renamed to `FnPtrVariadic`. - The mutually exclusive `const_token` and `mutability` fields of `Type::Ptr` have been unified into an enum of type `PointerMutability`, which was already previously used by `Expr::RawAddr`. - Every `Type` variant now holds attributes, which can represent the attributes of element types inside a tuple type, or attributes for a function return type. - `BareFnArg` is renamed to `NamedArg` and is used in `ParenthesizedGenericArguments`, in addition to the existing use in `Type::FnPtr`. #### Expressions - In `Expr::Closure`, the fields `or1_token` and `or2_token` have been renamed to `inputs_begin` and `inputs_end` to indicate the beginning and ending `|` token of the closure inputs. #### Statements - Attributes are now preserved on all expression kinds in statement position. Previously, parsing would silently lose attributes on some expression statements without a dedicated Expr variant, such as tail-call expressions. #### Patterns - The `guard` field of `Arm` is replaced by a new `Pat::Guard` variant held in the arm's `pat`. #### Items - The `unsafety` field of `Signature`, which represented the presence or absence of `unsafe`, is replaced by a 3-way `Safety` enum which may be safe, unsafe, or default. `ForeignItem::Static` also gets a `Safety`. - Some of the fields of `Receiver` have been split to a non-exhaustive `ReceiverKind` enum to create room for proposed new kinds of method receivers, such as pinned. - Type aliases now hold a `WhereClausePlacement` to distinguish between early placement (which is the default for item-level type aliases and is *deprecated* in associated type aliases) and late placement (which is the default for associated type aliases and is *unstable* in item-level type aliases). Parsing and printing a syntax tree will now preserve the where-clause placement rather than rewriting it to the default placement for the item kind. #### Generics - `WherePredicate::Lifetime` and `WherePredicate::Type` have a new field holding the attributes on the where-predicates. - `GenericParam::Type` and `GenericParam::Const` now match the rest of the syntax tree in holding their optional default using a single Option of tuple, rather than a pair of Option. #### Literals - The `Parse` implementation of `Lifetime` no longer permits keyword lifetimes, matching a change in Rust 1.81 to deny such lifetimes pre-expansion. `Lifetime::parse_any` may be used to parse lifetimes permissive of keywords. - `LitInt` and `LitFloat` no longer implement `From<proc_macro2::Literal>`. Use `Lit::new(literal)` and then match `Lit::Int` or `Lit::Float`. - The `StrStyle` enum was unused and has been deleted. #### More - `File` contains a new `Option<Frontmatter>`, but does not yet parse frontmatter in `syn::parse_file` until that language feature progresses closer to stabilization. - Some enums no longer provide `From` impls. Construct the variant by name instead, such as `Expr::Array(e)` in place of `e.into()`. - The `pop` method of `Punctuated<T, P>` now returns `Option<T>` discarding the trailing punctuation if any, rather than `Option<Pair<T, P>>`. A new method `pop_pair` provides the old behavior. - Syntax tree traversal (`visit`, `visit_mut`, `fold`) no longer provides a method for processing `Span`. This was already incompletely supported and never walked most of the spans in a syntax tree. - The `Speculative` and `AnyDelimiter` traits have been sealed and cannot be implemented for types outside of Syn's `ParseStream`. ### [`v2.0.119`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.119) [Compare Source](https://redirect.github.com/dtolnay/syn/compare/2.0.118...2.0.119) - Preserve attributes on tail-call expressions in statement position ([#​1994](https://redirect.github.com/dtolnay/syn/issues/1994)) - Parse field-representing types builtin in type position ([#​1996](https://redirect.github.com/dtolnay/syn/issues/1996)) ### [`v2.0.118`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.118) [Compare Source](https://redirect.github.com/dtolnay/syn/compare/2.0.117...2.0.118) - Documentation improvements ### [`v2.0.117`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.117) [Compare Source](https://redirect.github.com/dtolnay/syn/compare/2.0.116...2.0.117) - Fix parsing of `self::` pattern in first function argument ([#​1970](https://redirect.github.com/dtolnay/syn/issues/1970)) ### [`v2.0.116`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.116) [Compare Source](https://redirect.github.com/dtolnay/syn/compare/2.0.115...2.0.116) - Optimize parse_fn_arg_or_variadic for less lookahead on erroneous receiver ([#​1968](https://redirect.github.com/dtolnay/syn/issues/1968)) ### [`v2.0.115`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.115) [Compare Source](https://redirect.github.com/dtolnay/syn/compare/2.0.114...2.0.115) - Enable GenericArgument::Constraint parsing in non-full mode ([#​1966](https://redirect.github.com/dtolnay/syn/issues/1966)) ### [`v2.0.114`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.114) [Compare Source](https://redirect.github.com/dtolnay/syn/compare/2.0.113...2.0.114) - Make std dependencies more easily discoverable in source code ([#​1956](https://redirect.github.com/dtolnay/syn/issues/1956), thanks [@​tamird](https://redirect.github.com/tamird)) ### [`v2.0.113`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.113) [Compare Source](https://redirect.github.com/dtolnay/syn/compare/2.0.112...2.0.113) - Allow parsing TypeParam with colon not followed by any type param bounds ([#​1953](https://redirect.github.com/dtolnay/syn/issues/1953), thanks [@​wyfo](https://redirect.github.com/wyfo)) ### [`v2.0.112`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.112) [Compare Source](https://redirect.github.com/dtolnay/syn/compare/2.0.111...2.0.112) - Fix panic in LitByte::new().value() ([#​1951](https://redirect.github.com/dtolnay/syn/issues/1951), thanks [@​VictorArcium](https://redirect.github.com/VictorArcium)) ### [`v2.0.111`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.111) [Compare Source](https://redirect.github.com/dtolnay/syn/compare/2.0.110...2.0.111) - Allow first argument of `braced!`, `bracketed!`, `parenthesized!` to be an otherwise unused variable ([#​1946](https://redirect.github.com/dtolnay/syn/issues/1946)) ### [`v2.0.110`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.110) [Compare Source](https://redirect.github.com/dtolnay/syn/compare/2.0.109...2.0.110) - Tweaks to improve build speed ([#​1939](https://redirect.github.com/dtolnay/syn/issues/1939), thanks [@​dishmaker](https://redirect.github.com/dishmaker)) - Make `syn::ext::IdentExt::unraw` available without "parsing" feature ([#​1940](https://redirect.github.com/dtolnay/syn/issues/1940)) - Support parsing `syn::Meta` followed by `=>` ([#​1944](https://redirect.github.com/dtolnay/syn/issues/1944)) ### [`v2.0.109`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.109) [Compare Source](https://redirect.github.com/dtolnay/syn/compare/2.0.108...2.0.109) - Tweaks to improve build speed ([#​1927](https://redirect.github.com/dtolnay/syn/issues/1927), [#​1928](https://redirect.github.com/dtolnay/syn/issues/1928), [#​1930](https://redirect.github.com/dtolnay/syn/issues/1930), [#​1932](https://redirect.github.com/dtolnay/syn/issues/1932), [#​1934](https://redirect.github.com/dtolnay/syn/issues/1934), thanks [@​dishmaker](https://redirect.github.com/dishmaker)) ### [`v2.0.108`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.108) [Compare Source](https://redirect.github.com/dtolnay/syn/compare/2.0.107...2.0.108) - Parse unrecognized or invalid literals as Lit::Verbatim ([#​1925](https://redirect.github.com/dtolnay/syn/issues/1925)) ### [`v2.0.107`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.107) [Compare Source](https://redirect.github.com/dtolnay/syn/compare/2.0.106...2.0.107) - Improve panic message when constructing a LitInt, LitFloat, or Lit from invalid syntax ([#​1917](https://redirect.github.com/dtolnay/syn/issues/1917)) - Improve panic message on Punctuated index out of bounds ([#​1922](https://redirect.github.com/dtolnay/syn/issues/1922)) ### [`v2.0.106`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.106) [Compare Source](https://redirect.github.com/dtolnay/syn/compare/2.0.105...2.0.106) - Replace `~const` syntax with `[const]` conditionally const syntax in trait bounds ([#​1896](https://redirect.github.com/dtolnay/syn/issues/1896), [rust-lang/rust#139858](https://redirect.github.com/rust-lang/rust/pull/139858)) - Support conditionally const impl Trait types ([#​1897](https://redirect.github.com/dtolnay/syn/issues/1897)) - Reject polarity modifier and lifetime binder used in the same trait bound ([#​1899](https://redirect.github.com/dtolnay/syn/issues/1899), [rust-lang/rust#127054](https://redirect.github.com/rust-lang/rust/pull/127054)) - Parse const trait bounds with bound lifetimes ([#​1902](https://redirect.github.com/dtolnay/syn/issues/1902)) - Parse bound lifetimes with lifetime bounds ([#​1903](https://redirect.github.com/dtolnay/syn/issues/1903)) - Allow type parameters and const parameters in trait bounds and generic closures ([#​1904](https://redirect.github.com/dtolnay/syn/issues/1904), [#​1907](https://redirect.github.com/dtolnay/syn/issues/1907), [#​1908](https://redirect.github.com/dtolnay/syn/issues/1908), [#​1909](https://redirect.github.com/dtolnay/syn/issues/1909)) ### [`v2.0.105`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.105) [Compare Source](https://redirect.github.com/dtolnay/syn/compare/2.0.104...2.0.105) - Disallow "negative" inherent impls like `impl !T {}` ([#​1881](https://redirect.github.com/dtolnay/syn/issues/1881), [rust-lang/rust#144386](https://redirect.github.com/rust-lang/rust/pull/144386)) ### [`v2.0.104`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.104) [Compare Source](https://redirect.github.com/dtolnay/syn/compare/2.0.103...2.0.104) - Disallow attributes on range expression ([#​1872](https://redirect.github.com/dtolnay/syn/issues/1872)) ### [`v2.0.103`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.103) [Compare Source](https://redirect.github.com/dtolnay/syn/compare/2.0.102...2.0.103) - Insert parentheses around binary operation with attribute ([#​1871](https://redirect.github.com/dtolnay/syn/issues/1871)) ### [`v2.0.102`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.102) [Compare Source](https://redirect.github.com/dtolnay/syn/compare/2.0.101...2.0.102) - Fix printing of nested Expr::Index and Expr::Tuple in non-full mode ([#​1869](https://redirect.github.com/dtolnay/syn/issues/1869)) ### [`v2.0.101`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.101) [Compare Source](https://redirect.github.com/dtolnay/syn/compare/2.0.100...2.0.101) - Improve TypeGenerics::as_turbofish to return longer-lived return value ([#​1861](https://redirect.github.com/dtolnay/syn/issues/1861)) ### [`v2.0.100`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.100) [Compare Source](https://redirect.github.com/dtolnay/syn/compare/2.0.99...2.0.100) - Add `Visit::visit_token_stream`, `VisitMut::visit_token_stream_mut`, `Fold::fold_token_stream` for processing TokenStream during syntax tree traversals ([#​1852](https://redirect.github.com/dtolnay/syn/issues/1852)) ### [`v2.0.99`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.99) [Compare Source](https://redirect.github.com/dtolnay/syn/compare/2.0.98...2.0.99) - Documentation improvements ### [`v2.0.98`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.98) [Compare Source](https://redirect.github.com/dtolnay/syn/compare/2.0.97...2.0.98) - Allow lifetimes in function pointer return values in `ParseStream::call` and `Punctuated` parsers ([#​1847](https://redirect.github.com/dtolnay/syn/issues/1847)) ### [`v2.0.97`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.97) [Compare Source](https://redirect.github.com/dtolnay/syn/compare/2.0.96...2.0.97) - Documentation improvements ### [`v2.0.96`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.96) [Compare Source](https://redirect.github.com/dtolnay/syn/compare/2.0.95...2.0.96) - Expression precedence fixes ([#​1834](https://redirect.github.com/dtolnay/syn/issues/1834), [#​1836](https://redirect.github.com/dtolnay/syn/issues/1836), [#​1837](https://redirect.github.com/dtolnay/syn/issues/1837), [#​1838](https://redirect.github.com/dtolnay/syn/issues/1838), [#​1839](https://redirect.github.com/dtolnay/syn/issues/1839), [#​1840](https://redirect.github.com/dtolnay/syn/issues/1840)) ### [`v2.0.95`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.95) [Compare Source](https://redirect.github.com/dtolnay/syn/compare/2.0.94...2.0.95) - Fix parenthesization of struct literals in let-chains ([#​1832](https://redirect.github.com/dtolnay/syn/issues/1832)) ### [`v2.0.94`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.94) [Compare Source](https://redirect.github.com/dtolnay/syn/compare/2.0.93...2.0.94) - Expression precedence fixes ([#​1811](https://redirect.github.com/dtolnay/syn/issues/1811), [#​1812](https://redirect.github.com/dtolnay/syn/issues/1812), [#​1813](https://redirect.github.com/dtolnay/syn/issues/1813), [#​1814](https://redirect.github.com/dtolnay/syn/issues/1814), [#​1815](https://redirect.github.com/dtolnay/syn/issues/1815), [#​1816](https://redirect.github.com/dtolnay/syn/issues/1816), [#​1818](https://redirect.github.com/dtolnay/syn/issues/1818), [#​1819](https://redirect.github.com/dtolnay/syn/issues/1819), [#​1820](https://redirect.github.com/dtolnay/syn/issues/1820), [#​1825](https://redirect.github.com/dtolnay/syn/issues/1825), [#​1826](https://redirect.github.com/dtolnay/syn/issues/1826), [#​1827](https://redirect.github.com/dtolnay/syn/issues/1827), [#​1828](https://redirect.github.com/dtolnay/syn/issues/1828), [#​1829](https://redirect.github.com/dtolnay/syn/issues/1829), [#​1830](https://redirect.github.com/dtolnay/syn/issues/1830)) ### [`v2.0.93`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.93) [Compare Source](https://redirect.github.com/dtolnay/syn/compare/2.0.92...2.0.93) - Fix expression parsing edge cases: `x as T <<= y` ([#​1804](https://redirect.github.com/dtolnay/syn/issues/1804)), `break as T` ([#​1805](https://redirect.github.com/dtolnay/syn/issues/1805)), `match x { _ if .. => {} }` ([#​1807](https://redirect.github.com/dtolnay/syn/issues/1807)) - Fix expression printing edge cases: `|| -> T 'a: {}` ([#​1806](https://redirect.github.com/dtolnay/syn/issues/1806)), `if break x {}` ([#​1808](https://redirect.github.com/dtolnay/syn/issues/1808), [#​1810](https://redirect.github.com/dtolnay/syn/issues/1810)) ### [`v2.0.92`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.92) [Compare Source](https://redirect.github.com/dtolnay/syn/compare/2.0.91...2.0.92) - Fix parenthesization of jumps inside ranges ([#​1798](https://redirect.github.com/dtolnay/syn/issues/1798)) ### [`v2.0.91`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.91) [Compare Source](https://redirect.github.com/dtolnay/syn/compare/2.0.90...2.0.91) - Support parsing `Vec<Arm>` using `parse_quote!` ([#​1796](https://redirect.github.com/dtolnay/syn/issues/1796), [#​1797](https://redirect.github.com/dtolnay/syn/issues/1797)) ### [`v2.0.90`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.90) [Compare Source](https://redirect.github.com/dtolnay/syn/compare/2.0.89...2.0.90) - Fix automatic parenthesization of subexpressions containing outer attributes, such as `(#[attr] thing).field` ([#​1785](https://redirect.github.com/dtolnay/syn/issues/1785)) - Fix automatic parenthesization of function calls via a struct field, such as `(thing.field)()` and `thing.0()` ([#​1786](https://redirect.github.com/dtolnay/syn/issues/1786)) ### [`v2.0.89`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.89) [Compare Source](https://redirect.github.com/dtolnay/syn/compare/2.0.88...2.0.89) - Fix *"compiler/fallback mismatch 949"* panic ([dtolnay/proc-macro2#483](https://redirect.github.com/dtolnay/proc-macro2/issues/483)) ### [`v2.0.88`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.88) [Compare Source](https://redirect.github.com/dtolnay/syn/compare/2.0.87...2.0.88) - Improve error recovery in `parse_str` ([#​1783](https://redirect.github.com/dtolnay/syn/issues/1783)) ### [`v2.0.87`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.87) [Compare Source](https://redirect.github.com/dtolnay/syn/compare/2.0.86...2.0.87) - Add [`Cursor::any_group`](https://docs.rs/syn/2/syn/buffer/struct.Cursor.html#method.any_group) ([#​1777](https://redirect.github.com/dtolnay/syn/issues/1777)) - Add [`Expr::peek`](https://docs.rs/syn/2/syn/enum.Expr.html#method.peek) ([#​1778](https://redirect.github.com/dtolnay/syn/issues/1778)) - Improve syntax support for enum discriminant expressions in non-"full" mode ([#​1779](https://redirect.github.com/dtolnay/syn/issues/1779)) ### [`v2.0.86`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.86) [Compare Source](https://redirect.github.com/dtolnay/syn/compare/2.0.85...2.0.86) - Support peeking the end of a parse stream ([#​1689](https://redirect.github.com/dtolnay/syn/issues/1689)) - Allow `parse_quote!` to produce Vec\<Attribute> ([#​1775](https://redirect.github.com/dtolnay/syn/issues/1775)) ### [`v2.0.85`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.85) [Compare Source](https://redirect.github.com/dtolnay/syn/compare/2.0.84...2.0.85) - Preserve extern static unsafety in ForeignItem::Verbatim ([#​1773](https://redirect.github.com/dtolnay/syn/issues/1773)) ### [`v2.0.84`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.84) [Compare Source](https://redirect.github.com/dtolnay/syn/compare/2.0.83...2.0.84) - Parse safe and explicitly unsafe extern items ([#​1768](https://redirect.github.com/dtolnay/syn/issues/1768), [rust-lang/rust#123743](https://redirect.github.com/rust-lang/rust/issues/123743), [rust-lang/rfcs#3484](https://redirect.github.com/rust-lang/rfcs/pull/3484)) - Parse self captures: `impl Sized + use<Self>` ([#​1772](https://redirect.github.com/dtolnay/syn/issues/1772)) ### [`v2.0.83`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.83) [Compare Source](https://redirect.github.com/dtolnay/syn/compare/2.0.82...2.0.83) - Documentation improvements ### [`v2.0.82`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.82) [Compare Source](https://redirect.github.com/dtolnay/syn/compare/2.0.81...2.0.82) - Provide `Parse` impls for PreciseCapture and CapturedParam ([#​1757](https://redirect.github.com/dtolnay/syn/issues/1757), [#​1758](https://redirect.github.com/dtolnay/syn/issues/1758)) - Support parsing `unsafe` attributes ([#​1759](https://redirect.github.com/dtolnay/syn/issues/1759)) - Add Fold and VisitMut methods for Vec\<Attribute> ([#​1762](https://redirect.github.com/dtolnay/syn/issues/1762)) ### [`v2.0.81`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.81) [Compare Source](https://redirect.github.com/dtolnay/syn/compare/2.0.80...2.0.81) - Add TypeParamBound::PreciseCapture to represent precise capture syntax `impl Trait + use<'a, T>` ([#​1752](https://redirect.github.com/dtolnay/syn/issues/1752), [#​1753](https://redirect.github.com/dtolnay/syn/issues/1753), [#​1754](https://redirect.github.com/dtolnay/syn/issues/1754)) ### [`v2.0.80`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.80) [Compare Source](https://redirect.github.com/dtolnay/syn/compare/2.0.79...2.0.80) - Add `Expr::RawAddr` ([#​1743](https://redirect.github.com/dtolnay/syn/issues/1743)) - Reject precise captures and \~const in inappropriate syntax positions ([#​1747](https://redirect.github.com/dtolnay/syn/issues/1747)) - Reject trait bound containing only precise capture ([#​1748](https://redirect.github.com/dtolnay/syn/issues/1748)) ### [`v2.0.79`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.79) [Compare Source](https://redirect.github.com/dtolnay/syn/compare/2.0.78...2.0.79) - Fix infinite loop on parsing chained ranges ([#​1741](https://redirect.github.com/dtolnay/syn/issues/1741)) - Fix panic in parsing `use` items containing absolute paths ([#​1742](https://redirect.github.com/dtolnay/syn/issues/1742)) ### [`v2.0.78`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.78) [Compare Source](https://redirect.github.com/dtolnay/syn/compare/2.0.77...2.0.78) - Fix infinite loop on chained comparison ([#​1739](https://redirect.github.com/dtolnay/syn/issues/1739)) ### [`v2.0.77`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.77) [Compare Source](https://redirect.github.com/dtolnay/syn/compare/2.0.76...2.0.77) - Support parsing `Expr::Tuple` in non-"full" mode ([#​1727](https://redirect.github.com/dtolnay/syn/issues/1727)) ### [`v2.0.76`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.76) [Compare Source](https://redirect.github.com/dtolnay/syn/compare/2.0.75...2.0.76) - Enforce that tail call `become` keyword is followed by an expression ([#​1725](https://redirect.github.com/dtolnay/syn/issues/1725)) ### [`v2.0.75`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.75) [Compare Source](https://redirect.github.com/dtolnay/syn/compare/2.0.74...2.0.75) - Automatically fill in missing turbofish when printing ExprPath and other paths in expression position ([#​1722](https://redirect.github.com/dtolnay/syn/issues/1722)) ### [`v2.0.74`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.74) [Compare Source](https://redirect.github.com/dtolnay/syn/compare/2.0.73...2.0.74) - Fix *"temporary is dropped and runs the destructor for type \`impl Iterator\`"* regression affecting certain use of `Generics` iterator methods ([#​1719](https://redirect.github.com/dtolnay/syn/issues/1719)) ### [`v2.0.73`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.73) [Compare Source](https://redirect.github.com/dtolnay/syn/compare/2.0.72...2.0.73) - Support parsing unnamed C varargs within function pointer types ([#​1711](https://redirect.github.com/dtolnay/syn/issues/1711)) - Improve synthesized error message on unexpected tokens at the end of the expected contents of a delimited group ([#​1713](https://redirect.github.com/dtolnay/syn/issues/1713)) - Support parsing unstable tail call syntax ([#​1714](https://redirect.github.com/dtolnay/syn/issues/1714), [rust-lang/rust#112788](https://redirect.github.com/rust-lang/rust/issues/112788)) - Add [`Fields::members`](https://docs.rs/syn/2.0.73/syn/enum.Fields.html#method.members) iterator ([#​1716](https://redirect.github.com/dtolnay/syn/issues/1716), thanks [@​Fancyflame](https://redirect.github.com/Fancyflame)) ### [`v2.0.72`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.72) [Compare Source](https://redirect.github.com/dtolnay/syn/compare/2.0.71...2.0.72) - Parse `use<'a, T>` precise capturing bounds ([#​1707](https://redirect.github.com/dtolnay/syn/issues/1707), thanks [@​compiler-errors](https://redirect.github.com/compiler-errors)) ### [`v2.0.71`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.71) [Compare Source](https://redirect.github.com/dtolnay/syn/compare/2.0.70...2.0.71) - Do not require mutable borrow in Punctuated::get() ([#​1706](https://redirect.github.com/dtolnay/syn/issues/1706), thanks [@​lemunozm](https://redirect.github.com/lemunozm)) ### [`v2.0.70`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.70) [Compare Source](https://redirect.github.com/dtolnay/syn/compare/2.0.69...2.0.70) - Improve parenthesization of closures, jumps, ranges, chained comparisons, and let ([#​1694](https://redirect.github.com/dtolnay/syn/issues/1694), [#​1695](https://redirect.github.com/dtolnay/syn/issues/1695), [#​1698](https://redirect.github.com/dtolnay/syn/issues/1698), [#​1699](https://redirect.github.com/dtolnay/syn/issues/1699), [#​1700](https://redirect.github.com/dtolnay/syn/issues/1700)) ### [`v2.0.69`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.69) [Compare Source](https://redirect.github.com/dtolnay/syn/compare/2.0.68...2.0.69) - Correctly parenthesize labeled loops inside a break value ([#​1692](https://redirect.github.com/dtolnay/syn/issues/1692)) - Add `Punctuated::get` and `get_mut` ([#​1693](https://redirect.github.com/dtolnay/syn/issues/1693)) ### [`v2.0.68`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.68) [Compare Source](https://redirect.github.com/dtolnay/syn/compare/2.0.67...2.0.68) - Improve panic location when `parse_quote!` parses invalid syntax ([#​1690](https://redirect.github.com/dtolnay/syn/issues/1690), thanks [@​stepancheg](https://redirect.github.com/stepancheg)) - More efficient peek implementation for `Group` and `Lifetime` ([#​1687](https://redirect.github.com/dtolnay/syn/issues/1687)) ### [`v2.0.67`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.67) [Compare Source](https://redirect.github.com/dtolnay/syn/compare/2.0.66...2.0.67) - Produce more accurate error message locations for errors located at the end of a nested group ([#​1679](https://redirect.github.com/dtolnay/syn/issues/1679), [#​1680](https://redirect.github.com/dtolnay/syn/issues/1680)) - Support peeking `LitCStr` in ParseStream::peek ([#​1682](https://redirect.github.com/dtolnay/syn/issues/1682)) ### [`v2.0.66`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.66) [Compare Source](https://redirect.github.com/dtolnay/syn/compare/2.0.65...2.0.66) - Allow braced structs when parsing ExprLet ([#​1671](https://redirect.github.com/dtolnay/syn/issues/1671)) ### [`v2.0.65`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.65) [Compare Source](https://redirect.github.com/dtolnay/syn/compare/2.0.64...2.0.65) - Optimize the implementation of `Fold` to compile faster ([#​1666](https://redirect.github.com/dtolnay/syn/issues/1666), [#​1667](https://redirect.github.com/dtolnay/syn/issues/1667), [#​1668](https://redirect.github.com/dtolnay/syn/issues/1668)) ### [`v2.0.64`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.64) [Compare Source](https://redirect.github.com/dtolnay/syn/compare/2.0.63...2.0.64) - Support using ParseBuffer across `catch_unwind` ([#​1646](https://redirect.github.com/dtolnay/syn/issues/1646)) - Validate that the expression in a let-else ends in brace as required by rustc ([#​1648](https://redirect.github.com/dtolnay/syn/issues/1648), [#​1649](https://redirect.github.com/dtolnay/syn/issues/1649)) - Legalize invalid const generic arguments by wrapping in braces ([#​1654](https://redirect.github.com/dtolnay/syn/issues/1654), [#​1655](https://redirect.github.com/dtolnay/syn/issues/1655)) - Fix some expression precedence edge cases involving `break` and `return` in loop headers ([#​1656](https://redirect.github.com/dtolnay/syn/issues/1656)) - Always print closure bodies with a brace when the closure has an explicit return type ([#​1658](https://redirect.github.com/dtolnay/syn/issues/1658)) - Automatically insert necessary parentheses in ToTokens for Expr when required by expression precedence ([#​1659](https://redirect.github.com/dtolnay/syn/issues/1659)) - Support struct literal syntax in match guard expressions ([#​1662](https://redirect.github.com/dtolnay/syn/issues/1662)) ### [`v2.0.63`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.63) [Compare Source](https://redirect.github.com/dtolnay/syn/compare/2.0.62...2.0.63) - Parse and print long if-else-if chains without reliance on deep recursion to avoid overflowing stack ([#​1644](https://redirect.github.com/dtolnay/syn/issues/1644), [#​1645](https://redirect.github.com/dtolnay/syn/issues/1645)) ### [`v2.0.62`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.62) [Compare Source](https://redirect.github.com/dtolnay/syn/compare/2.0.61...2.0.62) - Reject invalid unparenthesized range and comparison operator expressions ([#​1642](https://redirect.github.com/dtolnay/syn/issues/1642), [#​1643](https://redirect.github.com/dtolnay/syn/issues/1643)) ### [`v2.0.61`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.61) [Compare Source](https://redirect.github.com/dtolnay/syn/compare/2.0.60...2.0.61) - Check for legal binding name in the ident of Pat::Ident ([#​1627](https://redirect.github.com/dtolnay/syn/issues/1627)) - Resolve unexpected_cfgs warning ([#​1635](https://redirect.github.com/dtolnay/syn/issues/1635)) ### [`v2.0.60`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.60) [Compare Source](https://redirect.github.com/dtolnay/syn/compare/2.0.59...2.0.60) - Improve how None-delimited groups are counted by `peek` ([#​1625](https://redirect.github.com/dtolnay/syn/issues/1625)) ### [`v2.0.59`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.59) [Compare Source](https://redirect.github.com/dtolnay/syn/compare/2.0.58...2.0.59) - Parse `c"…"` and `cr"…"` C-string literal syntax as `Lit::CStr` ([#​1502](https://redirect.github.com/dtolnay/syn/issues/1502)) </details> --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/sonic-net/sonic-dash-ha). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4yNDkuMSIsInVwZGF0ZWRJblZlciI6IjQ0LjI0OS4xIiwidGFyZ2V0QnJhbmNoIjoibWFzdGVyIiwibGFiZWxzIjpbXX0=--> Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR only affects the AST and doesn't actually change anything semantically.
All occurrences of
~constoutside of libcore have been replaced by[const]. Within libcore we have to wait for rustfmt to be bumped in the bootstrap compiler. This will happen "automatically" (when rustfmt is run) during the bootstrap bump, as rustfmt converts~constinto[const]. After this we can remove the~constsupport from the parserCaveat discovered during impl: there is no legacy bare trait object recovery for
[const] Traitas that snippet in type position goes down the slice /array parsing code and will errorr? @fee1-dead
cc @nikomatsakis @traviscross @compiler-errors