Rollup of 4 pull requests#154976
Conversation
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
|
@bors r+ rollup=never p=5 |
This comment has been minimized.
This comment has been minimized.
|
📌 Perf builds for each rolled up PR:
previous master: 30d0309fa8 In the case of a perf regression, run the following command for each PR you suspect might be the cause: |
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 differencesShow 410 test diffsStage 1
Stage 2
Additionally, 404 doctest diffs were found. These are ignored, as they are noisy. Job group index
Test dashboardRun cargo run --manifest-path src/ci/citool/Cargo.toml -- \
test-dashboard c753cef0df1af7b72ce375fb7c9fd4fc31bfb9ec --output-dir test-dashboardAnd then open Job duration changes
How to interpret the job duration changes?Job durations can vary a lot, based on the actual runner instance |
|
Finished benchmarking commit (c753cef): comparison URL. Overall result: ❌ regressions - no action needed@rustbot label: -perf-regression Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
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.
CyclesThis perf run didn't have relevant results for this metric. Binary sizeResults (primary 0.1%, secondary 0.1%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Bootstrap: 489.264s -> 489.76s (0.10%) |
Successful merges:
#[diagnostic::on_const]for local impls #154609 (Enable#[diagnostic::on_const]for local impls)Rc#154678 (Introduce #[diagnostic::on_move] onRc)r? @ghost
Create a similar rollup