Repository navigation
Rollup of 6 pull requests - #165270
Rollup of 6 pull requests#165270
Conversation
This becomes particularly confusing when a type parameter has a default.
```
--> $DIR/default-type-parameter.rs:8:17
|
LL | fn foo() -> u32 { 0 }
| ^^^ expected `()`, found `u32`
|
note: type in trait
--> $DIR/default-type-parameter.rs:2:17
|
LL | fn foo() -> T;
| ^
= note: expected signature `fn() -> ()`
found signature `fn() -> u32`
note: expected to match this type parameter
--> $DIR/default-type-parameter.rs:1:13
|
LL | trait Trait<T = ()> {
| ^^^^^^
help: change the output type to match the trait
|
LL - fn foo() -> u32 { 0 }
LL + fn foo() -> () { 0 }
```
…the trait
```
error[E0053]: method `foo` has an incompatible type for trait
--> $DIR/async-example-desugared-boxed-in-trait.rs:11:28
|
LL | impl MyTrait for i32 {
LL | async fn foo(&self) -> i32 {
| ^^^ expected `Pin<Box<dyn Future<Output = i32>>>`, found future
|
note: type in trait
--> $DIR/async-example-desugared-boxed-in-trait.rs:7:22
|
LL | trait MyTrait {
LL | fn foo(&self) -> Pin<Box<dyn Future<Output = i32> + '_>>;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: expected signature `fn(&_) -> Pin<Box<dyn Future<Output = i32>>>`
found signature `fn(&_) -> impl Future<Output = i32>`
```
…type in trait" note
```
error[E0053]: method `foo` has an incompatible type for trait
--> $DIR/default-type-parameter.rs:8:17
|
LL | impl Trait for S {
LL | fn foo() -> u32 { 0 }
| ^^^ expected `()`, found `u32`
|
note: type in trait
--> $DIR/default-type-parameter.rs:2:17
|
LL | trait Trait<T = ()> {
| ------ expected to match the default of type parameter `T`
LL | fn foo() -> T;
| ^
= note: expected signature `fn() -> ()`
found signature `fn() -> u32`
help: change the output type to match the trait
|
LL - fn foo() -> u32 { 0 }
LL + fn foo() -> () { 0 }
|
```
When used, this option creates a subheading within the sidebar “Crates” list for this crate and all crates which pass the same value. These headings are displayed in alphabetical order; crates without the option, or with it set to the empty string, always appear first. The intended use of this option is to allow Cargo to automatically separate a workspace’s crate list into the workspace’s own crates and their external dependencies. Authors could also use RUSTDOCFLAGS or other means to create custom headings for their documentation builds.
rustdoc: add unstable option `--crate-list-heading` to customize the sidebar crate list. When used, this option creates a subheading within the sidebar “Crates” list for this crate and all crates which pass the same value. These headings are displayed in alphabetical order; crates without the option, or with it set to the empty string, always appear first. The intended use of this option is to allow Cargo to automatically separate a workspace’s crate list into the workspace’s own crates and their external dependencies (as requested in rust-lang#85759 and, loosely, rust-lang#81031). Even without Cargo support, authors could also use `RUSTDOCFLAGS` to create custom headings for their documentation builds (which may address rust-lang#16328). As currently written, merging this would break all nightly builds against a pre-existing `target/doc/`, because the format of `crates.js` (defining variable `window.ALL_CRATES`) is changed. I don’t know whether backwards compatibility is worth implementing here, but it is possible to arrange — I figured I should first get a review of the general idea before polishing it. ---- Example of the new sidebar appearance in one of my workspaces: <img width="258" alt="image" src="https://github.com/user-attachments/assets/515e3964-a293-4301-b878-5b2394855ffd" /> <details><summary>Original obsolete version</summary> <img width="269" alt="image" src="https://github.com/user-attachments/assets/5db8a93f-9511-4d6b-8219-9d0bc74f07ed" /></details> The vertical margins `<h3>Dependencies</h3>` should probably adjusted to have clearer visual hierarchy, but I don’t think that should be done in this PR. Also note that this additional header will not appear until explicitly requested via the flag — in this screenshot I am also using a patched Cargo. ---- @rustbot label A-rustdoc-ui T-rustdoc T-rustdoc-frontend
… r=jieyouxu Restore aarch64-apple-1 jobs with free disk space The `apple-1` jobs seem to work with the free disk space script that I've copied from rust-lang#165148 Lets re-enable them The commits are cherry-picked from rust-lang#165148 without changes, plus a few added commits to disable the `-2` jobs again. r? ghost
Provide more context when an expected type was a type parameter
This becomes particularly confusing when a type parameter has a default.
```
error[E0053]: method `foo` has an incompatible type for trait
--> $DIR/default-type-parameter.rs:8:17
|
LL | impl Trait for S {
LL | fn foo() -> u32 { 0 }
| ^^^ expected `()`, found `u32`
|
note: type in trait
--> $DIR/default-type-parameter.rs:2:17
|
LL | trait Trait<T = ()> {
| ------ expected to match the default of type parameter `T`
LL | fn foo() -> T;
| ^
= note: expected signature `fn() -> ()`
found signature `fn() -> u32`
help: change the output type to match the trait
|
LL - fn foo() -> u32 { 0 }
LL + fn foo() -> () { 0 }
|
```
Fix rust-lang#67991.
This comment has been minimized.
This comment has been minimized.
Rollup of 6 pull requests try-job: dist-various-1 try-job: test-various try-job: test-x86_64-gnu-aux try-job: test-x86_64-msvc-1 try-job: test-aarch64-apple-1 try-job: test-x86_64-mingw-1 try-job: test-i686-msvc try-job: test-armhf-gnu try-job: test-x86_64-gnu-llvm-22-3 try-job: test-aarch64-msvc-2
This comment has been minimized.
This comment has been minimized.
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 f90a2d2 (parent) -> 349bba6 (this PR) Test differencesShow 21 test diffsStage 1
Stage 2
Additionally, 4 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 349bba62f1838cbd9b453ffda272c6972754122d --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 |
|
📌 Perf builds for each rolled up PR:
parent commit: f90a2d27c2 In the case of a perf regression, run the following command with the SHAs of each PR you suspect might be the cause: |
|
Finished benchmarking commit (349bba6): 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 -2.3%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (secondary -5.6%)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: 486.771s -> 493.204s (1.32%) |
Successful merges:
--crate-list-headingto customize the sidebar crate list. #138143 (rustdoc: add unstable option--crate-list-headingto customize the sidebar crate list.)AbiAlignwithAlignin function returns #165262 (ReplaceAbiAlignwithAlignin function returns)r? @ghost
Create a similar rollup