Skip to content

subtree-push nightly-2026-08-27 - #7079

Merged
Manishearth merged 39 commits into
rust-lang:mainfrom
ytmimi:subtree-push-nightly-2026-08-27
Aug 28, 2026
Merged

subtree-push nightly-2026-08-27#7079
Manishearth merged 39 commits into
rust-lang:mainfrom
ytmimi:subtree-push-nightly-2026-08-27

Conversation

@ytmimi

@ytmimi ytmimi commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Bumping the toolchain version as part of a git subtree push.

Before:

1.99.0-nightly (9f36de775 2026-07-19)

After:

1.100.0-nightly (bff8e12ff 2026-08-26)

mkroening and others added 30 commits June 26, 2026 15:48
…om outer attributes

It's possible that at least one of the attributes is a custom proc macro that
takes the module tokens as an input. It's hard to know for sure since rustfmt
only operates on the AST pre-expansion. In this case we'll be overly permissive
and just ignore the file not found error so rustfmt can still try formatting the
input.

Fixes rustfmt issue 6959
rustfmt fix: allow file not found errors for external mods annotated with `#[my_macro]`

Tracking issue: rust-lang/rust#54727

`#[my_macro]` was stabilized for macro hygiene 2.0 in rust-lang/rust#157857. There isn't a guarantee that the external module exists on the file system so ignore any file not found errors encountered when trying to resolve the module's file.

Fixes rust-lang#6959

r? @petrochenkov

cc: @TimNN
…imi,jieyouxu

rustfmt: Discover modules via `cfg_select!`

This PR renames all occurrences of `cfg_match!` in rustfmt to `cfg_select!`. This makes the module file detection logic from rust-lang#6522 kick in for `cfg_select!` instead of `cfg_match!`, which no longer exists.

This PR performs no other adjustments to the logic to be as small as possible.

I am opening this PR in this repo since that is also the target for the more comprehensive rust-lang/rust#154202, which covers more than merely detecting other files through `cfg_select!`.

Closes rust-lang/rust#158371.

CC: @ytmimi, @CAD97
`cfg_select!` parsing needs to be implemented in rustfmt right now
because there's no good way to call `rustc_attr_parsing::parse_cfg_select`.
The plan is to leverage `rewrite_match_body` to help with `cfg_select!`
formatting.
Per the PR review I'm making `context: &RewriteContext<'_>` the first argument.
Also moved the `shape` and `span` to follow the `context`.
Because `inside_macro` is a `Rc<Cell<bool>>` cloning the entire context doesn't
actually isolate the `inside_macro` state. However, I've added a `debug_assert!`
to make sure that we only ever call `context.leave_macro` when we're on a code
path that immediately returns from `rewrite_macro_inner` so that we don't
unexpectedly impact default macro handling where we need to be more cautious
about adding or removing tokens.
…ghtly` release channel

Tests can use the following comment configuration to mark themselves as only
running on `stable` / `beta` release channels.

```rust
// rustfmt-stable: true
```

> [!NOTE]
> Using `stable` here since we already have an `ustable` variant for nightly
> only tests and I didn't want to refactor things now, but in the future I think
> we should refactor this to be more like:

```rust
// rustfmt-cfg_release_channel: {stable|beta|nightly}
```
These tests show that `cfg_select!` won't be formatted on `stable` or `beta`
release channels.
It is an enum with three variant, and all the variants have identical
fields, which is silly. This commit does the following.

- Renames it as `CoroutineMarker`, because the `Kind` suffix is used for
  enums. (The existing doc comment already uses the word "marker".)

- Renames the existing `GenBlockKind` as `CoroutineKind`, uses it
  within `CoroutineMarker`, and adds `CoroutineKind::is_gen`.

This removes the need for the `span`, `closure_id` and `return_id`
methods; direct field access now suffices.
Overhaul `CoroutineKind`

Its structure is a bit weird. Details in individual commits.

r? @mejrs
CPunisher and others added 9 commits August 25, 2026 09:35
Rollup of 5 pull requests

Successful merges:

 - rust-lang/rust#156749 (remove `box_patterns`)
 - rust-lang/rust#161411 (avoid overlapping const suggestions)
 - rust-lang/rust#161484 (Discard `.pdr` in the PSP linker script)
 - rust-lang/rust#161663 (Reduce dependency on implicit paths in bootstrap)
 - rust-lang/rust#161720 (rename rust_target_features query to make it clear that these are *all* target features)
add internal DSL for testing binders

implements rust-lang/project-assumptions-on-binders#8

apologies to the inevitable swarm of people who get pinged for this...

basically the only interesting diff is `compiler/rustc_hir_analysis/src/check/wfcheck.rs`, which actually implements the test. there's probably still features we want to add to this DSL (e.g. `RegionConstraint::AliasTyOutlivesViaEnv`), and there might be some bugs lurking, but this is at least a base to work off of. It's perma-unstable and for internal use only, so support and quality doesn't have to be incredibly high. For example, parser recovery and whatnot is just, bad, but whatever.

r? BoxyUwU
Bumping the toolchain version as part of a git subtree push.

Before:

```
1.99.0-nightly (9f36de775 2026-07-19)
```

After:

```
1.100.0-nightly (bff8e12ff 2026-08-26)
```
@rustbot rustbot added the S-waiting-on-review Status: awaiting review from the assignee but also interested parties. label Aug 28, 2026
@ytmimi

ytmimi commented Aug 28, 2026

Copy link
Copy Markdown
Contributor Author

As expected, the diff check failed because of cfg_select! formatting which was implemented in r-l/r, but we've restricted cfg_select! formatting to only work on the nightly release channel.

@Manishearth
Manishearth added this pull request to the merge queue Aug 28, 2026
Merged via the queue into rust-lang:main with commit 3aaa44c Aug 28, 2026
27 checks passed
@rustbot rustbot added release-notes Needs an associated changelog entry and removed S-waiting-on-review Status: awaiting review from the assignee but also interested parties. labels Aug 28, 2026
@ytmimi
ytmimi deleted the subtree-push-nightly-2026-08-27 branch August 28, 2026 03:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-notes Needs an associated changelog entry

Projects

None yet

Development

Successfully merging this pull request may close these issues.