Skip to content

Rollup of 4 pull requests#154976

Merged
rust-bors[bot] merged 10 commits intorust-lang:mainfrom
jhpratt:rollup-e8XWRVU
Apr 8, 2026
Merged

Rollup of 4 pull requests#154976
rust-bors[bot] merged 10 commits intorust-lang:mainfrom
jhpratt:rollup-e8XWRVU

Conversation

@jhpratt
Copy link
Copy Markdown
Member

@jhpratt jhpratt commented Apr 8, 2026

Successful merges:

r? @ghost

Create a similar rollup

LaneAsade and others added 10 commits March 27, 2026 15:23
This annotates the `Rc` type with the diagnostic attribute
`#[diagnostic::on_move]`. Now when a moved `Rc` is borrowed,
a suggestion to clone it is made, with a label explaining why.
When explicitly re-exporting a declarative macro by name, rustdoc
previously bypassed intermediate re-exports and dropped `#[doc(inline)]`
attributes, causing the macro to be incorrectly stripped if the original
definition was `#[doc(hidden)]`.

This updates `generate_item_with_correct_attrs` to walk the
`reexport_chain` specifically for declarative macros, allowing them to
inherit inline attributes exactly as glob imports do, while preserving
strict visibility rules for standard items.
…pr, r=BoxyUwU

Deduplication: Pulled common logic out from lower_const_arg_struct

This PR aims to deduplicate the logic in the function `lower_const_arg_struct` by creating a helper function `lower_path_for_struct_expr` which is shared between `rustc_hir_ty_lowering `and `rustc_hir_typeck`.

Related: rust-lang#150621

Helper function code:

```
pub struct ResolvedStructPath<'tcx> {
    pub res: Result<Res, ErrorGuaranteed>,
    pub ty: Ty<'tcx>,
}

pub fn lower_path_for_struct_expr(
        &self,
        qpath: hir::QPath<'tcx>,
        path_span: Span,
        hir_id: HirId,
    ) -> ResolvedStructPath<'tcx> {
        match qpath {
            hir::QPath::Resolved(ref maybe_qself, path) => {
                let self_ty = maybe_qself.as_ref().map(|qself| self.lower_ty(qself));
                let ty = self.lower_resolved_ty_path(self_ty, path, hir_id, PermitVariants::Yes);
                ResolvedStructPath { res: Ok(path.res), ty }
            }
            hir::QPath::TypeRelative(hir_self_ty, segment) => {
                let self_ty = self.lower_ty(hir_self_ty);

                let result = self.lower_type_relative_ty_path(
                    self_ty,
                    hir_self_ty,
                    segment,
                    hir_id,
                    path_span,
                    PermitVariants::Yes,
                );
                let ty = result
                    .map(|(ty, _, _)| ty)
                    .unwrap_or_else(|guar| Ty::new_error(self.tcx(), guar));

                ResolvedStructPath {
                    res: result.map(|(_, kind, def_id)| Res::Def(kind, def_id)),
                    ty,
                }
            }
        }
    }
```

Thanks to @BoxyUwU for the guidance on this issue.
Enable `#[diagnostic::on_const]` for local impls

Previously this attribute only did something if it was on a foreign impl.
…_rc_type, r=tgross35

Introduce #[diagnostic::on_move] on `Rc`

This is related to the tracking issue rust-lang#154181 and to the original issue rust-lang#149862.
…nline, r=lolbinarycat

rustdoc: Inherit inline attributes for declarative macros

When explicitly re-exporting a declarative macro by name, rustdoc previously bypassed intermediate re-exports and dropped `#[doc(inline)]` attributes, causing the macro to be incorrectly stripped if the original definition was `#[doc(hidden)]`.

This updates `generate_item_with_correct_attrs` to walk the `reexport_chain` specifically for declarative macros, allowing them to inherit inline attributes exactly as glob imports do, while preserving strict visibility rules for standard items.

Fixes rust-lang#154694
@rust-bors rust-bors bot added the rollup A PR which is a rollup label Apr 8, 2026
@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-libs Relevant to the library 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. labels Apr 8, 2026
@jhpratt
Copy link
Copy Markdown
Member Author

jhpratt commented Apr 8, 2026

@bors r+ rollup=never p=5

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors bot commented Apr 8, 2026

📌 Commit 084a82e has been approved by jhpratt

It is now in the queue for this repository.

@rust-bors rust-bors bot 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 Apr 8, 2026
@rust-bors

This comment has been minimized.

@rust-bors rust-bors bot added merged-by-bors This PR was explicitly merged by bors. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Apr 8, 2026
@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors bot commented Apr 8, 2026

☀️ Test successful - CI
Approved by: jhpratt
Duration: 4h 52m 30s
Pushing c753cef to main...

@rust-bors rust-bors bot merged commit c753cef into rust-lang:main Apr 8, 2026
12 checks passed
@rustbot rustbot added this to the 1.96.0 milestone Apr 8, 2026
@rust-timer
Copy link
Copy Markdown
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#154460 Deduplication: Pulled common logic out from lower_const_arg… 06fd60335b61e0046297b6e25958cce1d45cf79a (link)
#154609 Enable #[diagnostic::on_const] for local impls 736018d62a3f858de1dfe0c576ed139981fa5074 (link)
#154678 Introduce #[diagnostic::on_move] on Rc 57723173b8ee241c457ee50e7488ff2147d52f3a (link)
#154902 rustdoc: Inherit inline attributes for declarative macros fc19647c543d0ba29010f31e21f9cd59634c2304 (link)

previous master: 30d0309fa8

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
Copy Markdown
Contributor

github-actions bot commented Apr 8, 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 30d0309 (parent) -> c753cef (this PR)

Test differences

Show 410 test diffs

Stage 1

  • [rustdoc-html] tests/rustdoc-html/macro-reexport-inline.rs: [missing] -> pass (J1)
  • [ui] tests/ui/diagnostic_namespace/on_const/it_works_foreign.rs: [missing] -> pass (J1)
  • [ui] tests/ui/diagnostic_namespace/on_const/it_works_local.rs: [missing] -> pass (J1)

Stage 2

  • [ui] tests/ui/diagnostic_namespace/on_const/it_works_foreign.rs: [missing] -> pass (J0)
  • [ui] tests/ui/diagnostic_namespace/on_const/it_works_local.rs: [missing] -> pass (J0)
  • [rustdoc-html] tests/rustdoc-html/macro-reexport-inline.rs: [missing] -> pass (J2)

Additionally, 404 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 c753cef0df1af7b72ce375fb7c9fd4fc31bfb9ec --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. aarch64-apple: 3h 7m -> 4h 44m (+51.2%)
  2. test-various: 2h 8m -> 1h 50m (-13.7%)
  3. x86_64-gnu-llvm-21-2: 1h 38m -> 1h 27m (-11.7%)
  4. dist-apple-various: 1h 34m -> 1h 46m (+11.6%)
  5. dist-x86_64-apple: 2h 13m -> 2h 27m (+10.1%)
  6. pr-check-1: 32m 42s -> 29m 25s (-10.1%)
  7. dist-aarch64-llvm-mingw: 1h 45m -> 1h 35m (-9.2%)
  8. x86_64-gnu-tools: 1h 3m -> 57m 49s (-8.5%)
  9. dist-s390x-linux: 1h 27m -> 1h 34m (+8.3%)
  10. aarch64-gnu-llvm-21-1: 58m 10s -> 1h 2m (+7.5%)
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
Copy Markdown
Collaborator

Finished benchmarking commit (c753cef): 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.3% [0.3%, 0.3%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results (secondary 0.7%)

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)
2.3% [2.3%, 2.3%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-1.0% [-1.0%, -1.0%] 1
All ❌✅ (primary) - - 0

Cycles

This perf run didn't have relevant results for this metric.

Binary size

Results (primary 0.1%, secondary 0.1%)

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

mean range count
Regressions ❌
(primary)
0.1% [0.0%, 0.1%] 49
Regressions ❌
(secondary)
0.1% [0.0%, 0.1%] 24
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.1% [0.0%, 0.1%] 49

Bootstrap: 489.264s -> 489.76s (0.10%)
Artifact size: 395.30 MiB -> 395.37 MiB (0.02%)

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 T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library 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.

7 participants