Skip to content

Conversation

@matthiaskrgr
Copy link
Member

@matthiaskrgr matthiaskrgr commented Jan 6, 2026

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

Delta17920 and others added 13 commits December 18, 2025 15:53
Also, rename `DeclKind::Res` to `DeclKind::Def`.
`MacroRulesBinding` -> `MacroRulesDef`
…-bug, r=jdonszelmann

Fix macro_metavar_expr_concat behavior with nested repetitions

**The Bug**: The `${concat(...)}` expression was using the wrong loop index when inside nested repetitions (like optional groups), causing it to get "stuck" on the first element and generate duplicate code.

**The Fix**: Updated `metavar_expr_concat` in `transcribe.rs` to correctly search the repetition stack (`tscx.repeats`) for the target variable instead of blindly using the last index.

**Tests**:
    Added `tests/ui/macros/concat-nested-repetition.rs.`

Fixes rust-lang#150002
resolve: Rename "name bindings" to "name declarations"

This was discussed previously in some name resolution specification threads on zulip.
Link: [#t-compiler/help > understanding early name resolution of imports @ 💬](https://rust-lang.zulipchat.com/#narrow/channel/182449-t-compiler.2Fhelp/topic/understanding.20early.20name.20resolution.20of.20imports/near/545306658)

The main change is that `NameBinding` is renamed to `Decl`.
The `Name` part is skipped because almost everything in `rustc_resolve` is about names.
So in general the naming looks more compact now (`binding: NameBinding` -> `decl: Decl`).

I didn't rename *everything* including all the local variables, but did rename most of significant interfaces.
Late resolution in particular uses "bindings" in slightly different meanings, I didn't touch that.

Also, some interface comments are added/improved.

Renaming list:
- fn `define_binding_local` -> `plant_decl_into_local_module`
- fn `add_macro_use_binding` -> `add_macro_use_decl`
- fn `binding_description` -> `decl_description`
- enum `PendingBinding` -> `PendingDecl`
- field `ImportKind::Single::bindings` -> `ImportKind::Single::decls`
- field `NameResolution::non_glob_binding` -> `NameResolution::non_glob_decl`
- field `NameResolution::glob_binding` -> `NameResolution::glob_decl`
- fn `best_binding` -> `best_decl`
- fn `import` -> `new_import_decl`
- fn `try_define_local` -> `try_plant_decl_into_local_module`
- fn `new_ambiguity_binding` -> `new_decl_with_ambiguity`
- fn `new_warn_ambiguity_binding` -> `new_decl_with_warn_ambiguity`
- field `UnnecessaryQualification::binding` -> `UnnecessaryQualification::decl`
- struct `MacroRulesBinding` -> `MacroRulesDef`
- field `MacroRulesBinding::binding` -> `MacroRulesDef::decl`
- variant `MacroRulesScope::Binding` -> `MacroRulesScope::Def`
- enum `LexicalScopeBinding` -> `LateDecl`
- variant `LexicalScopeBinding::Item` -> `LateDecl::Decl`
- variant `LexicalScopeBinding::Res` -> `LateDecl::RibDef`
- field `ModuleData::self_binding` -> `ModuleData::self_decl`
- struct `NameBindingData` -> `DeclData`
- type `NameBinding` -> `Decl`
- enum `NameBindingKind` -> `DeclKind`
- variant `NameBindingKind::Res` -> `DeclKind::Def`
- field `NameBindingKind::Import::binding` -> `DeclKind::Import::source_decl`
- field `PrivacyError::binding` -> `PrivacyError::decl`
- field `ExternPreludeEntry::item_binding` -> `ExternPreludeEntry::item_decl`
- field `ExternPreludeEntry::flag_binding` -> `ExternPreludeEntry::flag_decl`
- field `Resolver::binding_parent_modules` -> `Resolver::decl_parent_modules`
- field `Resolver::dummy_binding` -> `Resolver::dummy_decl`
- field `Resolver::builtin_types_bindings` -> `Resolver::builtin_type_decls`
- field `Resolver::builtin_attrs_bindings` -> `Resolver::builtin_attr_decls`
- field `Resolver::registered_tool_bindings` -> `Resolver::registered_tool_decls`
- fn `ResolverArenas::new_res_binding` -> `ResolverArenas::new_def_decl`
- fn `ResolverArenas::new_pub_res_binding` -> `ResolverArenas::new_pub_def_decl`
- fn `ResolverArenas::alloc_name_binding` -> `ResolverArenas::alloc_decl`
- fn `ResolverArenas::alloc_macro_rules_binding` -> `ResolverArenas::alloc_macro_rules_def`
- fn `set_binding_parent_module` -> `set_decl_parent_module`
…t-cleanup, r=fmease

Cleanup some ui tests for const-traits

r? project-const-traits

These tests pretty much behave as expected now.
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. rollup A PR which is a rollup labels Jan 6, 2026
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=5

@bors
Copy link
Collaborator

bors commented Jan 6, 2026

📌 Commit 799c06f has been approved by matthiaskrgr

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 6, 2026
bors added a commit that referenced this pull request Jan 6, 2026
Rollup of 4 pull requests

Successful merges:

 - #150026 (Fix macro_metavar_expr_concat behavior with nested repetitions)
 - #150521 (resolve: Rename "name bindings" to "name declarations")
 - #150704 (MGCA: Const constructors support)
 - #150728 (Cleanup some ui tests for const-traits)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors
Copy link
Collaborator

bors commented Jan 6, 2026

⌛ Testing commit 799c06f with merge f0b7fcf...

@bors
Copy link
Collaborator

bors commented Jan 6, 2026

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jan 6, 2026
@JonathanBrouwer
Copy link
Contributor

Seems spurious but good excuse to let #148339 go first which deserved to go first
@bors r=matthiaskrgr

@bors
Copy link
Collaborator

bors commented Jan 6, 2026

💡 This pull request was already approved, no need to approve it again.

@bors
Copy link
Collaborator

bors commented Jan 6, 2026

📌 Commit 799c06f has been approved by matthiaskrgr

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 6, 2026
@rust-log-analyzer
Copy link
Collaborator

The job armhf-gnu failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
[TIMING:end] compile::Sysroot { compiler: Compiler { stage: 0, host: x86_64-unknown-linux-gnu, forced_compiler: false }, force_recompile: false } -- 0.007
[TIMING:end] builder::Libdir { compiler: Compiler { stage: 0, host: x86_64-unknown-linux-gnu, forced_compiler: false }, target: x86_64-unknown-linux-gnu } -- 0.002
[TIMING:end] compile::StdLink { compiler: Compiler { stage: 0, host: x86_64-unknown-linux-gnu, forced_compiler: false }, target_compiler: Compiler { stage: 0, host: x86_64-unknown-linux-gnu, forced_compiler: false }, target: x86_64-unknown-linux-gnu, crates: [], force_recompile: false } -- 0.001
##[group]Building stage1 compiler artifacts (stage0 -> stage1, x86_64-unknown-linux-gnu)
error: process didn't exit successfully: `sccache /checkout/obj/build/bootstrap/debug/rustc -vV` (exit status: 2)
--- stderr
sccache: error: Timed out waiting for server startup. Maybe the remote service is unreachable?
Run with SCCACHE_LOG=debug SCCACHE_NO_DAEMON=1 to get more information

Bootstrap failed while executing `--stage 2 test --host= --target arm-unknown-linux-gnueabihf`
Build completed unsuccessfully in 0:00:40
  local time: Tue Jan  6 18:51:03 UTC 2026
  network time: Tue, 06 Jan 2026 18:51:03 GMT

@bors
Copy link
Collaborator

bors commented Jan 6, 2026

⌛ Testing commit 799c06f with merge 0aced20...

@bors
Copy link
Collaborator

bors commented Jan 6, 2026

☀️ Test successful - checks-actions
Approved by: matthiaskrgr
Pushing 0aced20 to main...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jan 6, 2026
@bors bors merged commit 0aced20 into rust-lang:main Jan 6, 2026
12 checks passed
@rustbot rustbot added this to the 1.94.0 milestone Jan 6, 2026
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#150026 Fix macro_metavar_expr_concat behavior with nested repetiti… ab7f55d5361ed94e8666de32902266ea586cedc9 (link)
#150521 resolve: Rename "name bindings" to "name declarations" 08c8bec1c094f0d7472ddb44cfbcad25cd087cc9 (link)
#150704 MGCA: Const constructors support 80514855cdec2726009ca7ea2ed9fe6f8aef93d0 (link)
#150728 Cleanup some ui tests for const-traits 70a2da40ccf9c5d726f4dbcb67ec2900b960dd3f (link)

previous master: 4d73a008ea

In the case of a perf regression, run the following command for each PR you suspect might be the cause: @rust-timer build $SHA

@github-actions
Copy link
Contributor

github-actions bot commented Jan 6, 2026

What is this? This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.

Comparing 4d73a00 (parent) -> 0aced20 (this PR)

Test differences

Show 78 test diffs

Stage 1

  • [crashes] tests/crashes/132985.rs: pass -> [missing] (J0)
  • [crashes] tests/crashes/136138.rs: pass -> [missing] (J0)
  • [crashes] tests/crashes/139596.rs: pass -> [missing] (J0)
  • [crashes] tests/crashes/mgca/ace-with-const-ctor.rs: pass -> [missing] (J0)
  • [rustdoc] tests/rustdoc/constant/ice-associated-const-equality-105952.rs: [missing] -> pass (J0)
  • [ui] tests/ui/const-generics/mgca/const-ctor-overflow-eval.rs: [missing] -> pass (J0)
  • [ui] tests/ui/const-generics/mgca/const-ctor-with-error.rs: [missing] -> pass (J0)
  • [ui] tests/ui/const-generics/mgca/const-ctor.rs: [missing] -> pass (J0)
  • [ui] tests/ui/consts/rustc-impl-const-stability.rs: pass -> [missing] (J0)
  • [ui] tests/ui/macros/concat-nested-repetition.rs: [missing] -> pass (J0)
  • [ui] tests/ui/specialization/const_trait_impl.rs: pass -> [missing] (J0)
  • [ui] tests/ui/traits/const-traits/rustc-impl-const-stability.rs: [missing] -> pass (J0)
  • [ui] tests/ui/traits/const-traits/specialization/pass.rs: [missing] -> pass (J0)
  • [ui] tests/ui/traits/const-traits/specialization/specializing-constness-2.rs: [missing] -> pass (J0)
  • [ui] tests/ui/traits/const-traits/specialization/specializing-constness.rs: [missing] -> pass (J0)
  • [ui] tests/ui/traits/const-traits/specializing-constness-2.rs: pass -> [missing] (J0)
  • [ui] tests/ui/traits/const-traits/specializing-constness.rs: pass -> [missing] (J0)

Stage 2

  • [ui] tests/ui/const-generics/mgca/const-ctor-overflow-eval.rs: [missing] -> pass (J1)
  • [ui] tests/ui/const-generics/mgca/const-ctor-with-error.rs: [missing] -> pass (J1)
  • [ui] tests/ui/const-generics/mgca/const-ctor.rs: [missing] -> pass (J1)
  • [ui] tests/ui/consts/rustc-impl-const-stability.rs: pass -> [missing] (J1)
  • [ui] tests/ui/macros/concat-nested-repetition.rs: [missing] -> pass (J1)
  • [ui] tests/ui/specialization/const_trait_impl.rs: pass -> [missing] (J1)
  • [ui] tests/ui/traits/const-traits/rustc-impl-const-stability.rs: [missing] -> pass (J1)
  • [ui] tests/ui/traits/const-traits/specialization/pass.rs: [missing] -> pass (J1)
  • [ui] tests/ui/traits/const-traits/specialization/specializing-constness-2.rs: [missing] -> pass (J1)
  • [ui] tests/ui/traits/const-traits/specialization/specializing-constness.rs: [missing] -> pass (J1)
  • [ui] tests/ui/traits/const-traits/specializing-constness-2.rs: pass -> [missing] (J1)
  • [ui] tests/ui/traits/const-traits/specializing-constness.rs: pass -> [missing] (J1)
  • [crashes] tests/crashes/132985.rs: pass -> [missing] (J2)
  • [crashes] tests/crashes/136138.rs: pass -> [missing] (J2)
  • [crashes] tests/crashes/139596.rs: pass -> [missing] (J2)
  • [crashes] tests/crashes/mgca/ace-with-const-ctor.rs: pass -> [missing] (J2)
  • [rustdoc] tests/rustdoc/constant/ice-associated-const-equality-105952.rs: [missing] -> pass (J3)

Additionally, 44 doctest diffs were found. These are ignored, as they are noisy.

Job group index

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
    test-dashboard 0aced202c24f9356c1640fc0a7f07433b3a7124f --output-dir test-dashboard

And then open test-dashboard/index.html in your browser to see an overview of all executed tests.

Job duration changes

  1. x86_64-rust-for-linux: 2521.8s -> 3085.3s (+22.3%)
  2. pr-check-1: 1683.3s -> 1999.4s (+18.8%)
  3. x86_64-gnu-tools: 3218.2s -> 3769.2s (+17.1%)
  4. dist-apple-various: 4737.3s -> 3928.1s (-17.1%)
  5. aarch64-gnu-llvm-20-1: 3195.5s -> 3715.0s (+16.3%)
  6. tidy: 150.6s -> 173.0s (+14.9%)
  7. x86_64-gnu-gcc: 3349.3s -> 3762.4s (+12.3%)
  8. x86_64-gnu-llvm-21-3: 6144.6s -> 6890.8s (+12.1%)
  9. dist-powerpc64-linux: 5694.5s -> 5105.6s (-10.3%)
  10. i686-gnu-2: 5477.6s -> 6030.6s (+10.1%)
How to interpret the job duration changes?

Job durations can vary a lot, based on the actual runner instance
that executed the job, system noise, invalidated caches, etc. The table above is provided
mostly for t-infra members, for simpler debugging of potential CI slow-downs.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (0aced20): comparison URL.

Overall result: ❌ regressions - no action needed

@rustbot label: -perf-regression

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
0.2% [0.2%, 0.2%] 6
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Max RSS (memory usage)

This benchmark run did not return any relevant results for this metric.

Cycles

Results (secondary -4.4%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-4.4% [-4.4%, -4.4%] 1
All ❌✅ (primary) - - 0

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 473.709s -> 474.51s (0.17%)
Artifact size: 390.82 MiB -> 390.85 MiB (0.01%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merged-by-bors This PR was explicitly merged by bors. rollup A PR which is a rollup S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants