rustdoc: IXCRE: Preserve sizedness bounds on type params belonging to the parent item#157262
Conversation
|
r? @notriddle rustbot has assigned @notriddle. Use Why was this reviewer chosen?The reviewer was selected based on:
|
9cadf69 to
5a302ff
Compare
| @@ -1201,20 +1201,17 @@ impl GenericBound { | |||
| } | |||
|
|
|||
| fn is_bounded_by_lang_item(&self, tcx: TyCtxt<'_>, lang_item: LangItem) -> bool { | |||
There was a problem hiding this comment.
drive-by refactoring here and one below
There was a problem hiding this comment.
Merged into the new sized-bounds.rs test so we don't have 1000s of micro tests for cross-crate Sized bounds. Of course, there are still more out there which aren't so micro like inline_cross/impl-sized...
| // This transformation is only valid on type parameters defined on the closest item. | ||
| // If the parameter was defined by the parent item we know that the sizedness bound | ||
| // *has* to be user-written in which case we have to preserve it as is. | ||
| let Some(param_sizedness) = type_params.get_mut(param) else { return true }; |
There was a problem hiding this comment.
This is the core change. All changes around it are basically only refactoring because I got so annoyed at the state of things (cc issue #157247) that I couldn't help myself, I had to jettison the jank...
Lmk if I should be more disciplined and split this into two+ commits for ease of reviewing.
|
@bors r+ |
…bounds-on-parent-params, r=notriddle rustdoc: IXCRE: Preserve sizedness bounds on type params belonging to the parent item Fixes rust-lang#144015.
Rollup of 12 pull requests Successful merges: - #157085 (powerpc: warn against incorrect values for ABI-relevant target features) - #157170 (Use `impl` restrictions in `std`, `core`) - #157217 ([tiny] remove unecessary `.into()` calls) - #157262 (rustdoc: IXCRE: Preserve sizedness bounds on type params belonging to the parent item) - #157379 (Some more simple per-owner resolver changes) - #157381 (librustdoc: fix CSS border issue to support Firefox high contrast mode) - #155512 (interpreter: improve comments and error message in mir_assign_valid_types) - #157254 (Correct description of panic.rs) - #157290 (interpret: fix mir::UnOp layout computation) - #157332 (Rewrite target checking for `#[sanitize]`) - #157351 (Avoid leaking the query-job collection warning into the panic query stack) - #157389 (Add @clarfonthey to libs review rotation)
Rollup of 12 pull requests Successful merges: - rust-lang/rust#157085 (powerpc: warn against incorrect values for ABI-relevant target features) - rust-lang/rust#157170 (Use `impl` restrictions in `std`, `core`) - rust-lang/rust#157217 ([tiny] remove unecessary `.into()` calls) - rust-lang/rust#157262 (rustdoc: IXCRE: Preserve sizedness bounds on type params belonging to the parent item) - rust-lang/rust#157379 (Some more simple per-owner resolver changes) - rust-lang/rust#157381 (librustdoc: fix CSS border issue to support Firefox high contrast mode) - rust-lang/rust#155512 (interpreter: improve comments and error message in mir_assign_valid_types) - rust-lang/rust#157254 (Correct description of panic.rs) - rust-lang/rust#157290 (interpret: fix mir::UnOp layout computation) - rust-lang/rust#157332 (Rewrite target checking for `#[sanitize]`) - rust-lang/rust#157351 (Avoid leaking the query-job collection warning into the panic query stack) - rust-lang/rust#157389 (Add @clarfonthey to libs review rotation)
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (3b5acb2): comparison URL. Overall result: ❌ regressions - please read:Benchmarking means the PR may be perf-sensitive. It's automatically marked not fit for rolling up. Overriding is possible but disadvised: it risks changing compiler perf. Next, please: If you can, justify the regressions found in this try perf run in writing along with @bors rollup=never Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)This perf run didn't have relevant results for this metric. CyclesResults (primary -2.3%, secondary -2.1%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis perf run didn't have relevant results for this metric. Bootstrap: 519.257s -> 511.878s (-1.42%) |
|
Regressions look roughly reasonable for a correctness fix. |
Fixes #144015.