Repository navigation
Rollup of 7 pull requests - #164230
Rollup of 7 pull requests#164230
Conversation
This test assumes that dlclose runs the destructors of thread locals and is more than the no-op implementation that musl provides. There is not a lot of value in this test on musl hosts, so ignoring it seems appropriate to me. See https://wiki.musl-libc.org/functional-differences-from-glibc.html#Unloading-libraries for more details on dlclose in musl.
Modify `on_unimplemented` attribute wording for `Fn*` traits.
```
error[E0277]: expected `Fn(<_ as ATC<'a>>::Type)` signature, found `F`
--> $DIR/issue-62529-3.rs:25:14
|
LL | call(f, ());
| ---- ^ expected `Fn(<_ as ATC<'a>>::Type)` signature, found `F`
| |
| required by a bound introduced by this call
|
= note: expected type with signature `for<'a> fn(<_ as ATC<'a>>::Type)`
found type parameter with signature `fn(())`
note: required by a bound in `call`
--> $DIR/issue-62529-3.rs:9:36
|
LL | fn call<'b, T: for<'a> ATC<'a>, F: for<'a> Fn(<T as ATC<'a>>::Type)>(
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `call`
```
…stcAssertVariance for diagnostic purposes.
…the size of `AttributeKind` - Add ui test for #[rustc_assert_variance]
…rameters instead of their parent ADTs - Add support for bivariance to rustc_assert_variance - Update rustc_assert_variance ui test accordingly and add case for const generic params - Minor diagnostic message fix
…r types, cell types, sync lock and guard types, Arc, Rc, Unique, Box, and NonNull
…/attributes/rustc_assert_variance.rs
Extract the rpath logic shared by `Llvm`, `Lld` and `OmpOffload` into `llvm_lib_rpath`.
…ause-162776, r=aerooneqq validate generic parameter remapping in delegation tracking issue: rust-lang#118212 fixes rust-lang#162776 fixes rust-lang#163868 validate generic parameter remapping before inheriting delegated signatures and predicates. ensure each remapped parameter points to an in-range argument of the same kind: type, lifetime, or const. use `FallibleTypeFolder` to detect invalid mappings and recover with diagnostics. preserve const parameter type clauses during predicate recovery. +regression test for rust-lang#162776 issue and rust-lang#163868 r? compiler
…, r=Kobzol bootstrap: add an rpath to LLVM library for LLVM tools Closes [rust-lang#164063](rust-lang#164063) by adding rpath to the LLVM tool executables on both Linux and macOS, using the same approach as Lld::run. This PR is now written by a human, resubmitting [rust-lang#164064](rust-lang#164064) which was diagnosed and written by Claude. **Validation:** macOS ```bash ❯ otool -l ~/workspace/repos/rust/build/aarch64-apple-darwin/llvm/bin/llvm-objcopy | grep -A2 LC_RPATH cmd LC_RPATH cmdsize 40 path @loader_path/../../../ (offset 12) -- cmd LC_RPATH cmdsize 32 path @loader_path/../lib (offset 12) ❯ otool -L build/aarch64-apple-darwin/llvm/lib/libLLVM.dylib build/aarch64-apple-darwin/llvm/lib/libLLVM.dylib: @rpath/libLLVM.dylib (compatibility version 1.0.0, current version 23.1.3) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1359.0.0) /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.12) /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 2200.27.0) ``` linux ```bash readelf -d build/x86_64-unknown-linux-gnu/llvm/bin/llvm-objcopy | grep RUNPATH 0x000000000000001d (RUNPATH) Library runpath: [$ORIGIN/../../../:$ORIGIN/../lib:$ORIGIN/../lib/x86_64-unknown-linux-gnu] ```
Tweak wording of "expected/found signature" errors Do not incorrectly state that we expected a closure when we expected *anything* that conforms to an `Fn*` trait.
…tr, r=mejrs
Add internal #[rustc_assert_variance] attribute for use in std
Add a new attribute `#[rustc_assert_variance]` to ensure the variance of a generic parameter of an algebraic data type at compile time.
The attribute attaches directly to generic parameters of an ADT declaration, and will cause a compile error if the variance of the type does not match what is stated. For example:
```rust
struct Foo<#[rustc_assert_variance(covariant)] 'a, #[rustc_assert_variance(covariant)] T> {
val: &'a mut T,
}
```
Trying to compile this struct definition gives this error:
```
error: `Foo` is expected to be covariant in `T` but is not
--> src/main.rs:3:1
|
3 | pub struct Foo<#[rustc_assert_variance(covariant)] 'a, #[rustc_assert_variance(covariant)] T> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-^
| |
| `Foo` is invariant in `T`
|
note: required by this attribute
--> src/main.rs:3:56
|
3 | pub struct Foo<#[rustc_assert_variance(covariant)] 'a, #[rustc_assert_variance(covariant)] T> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
```
The goal is for this to help prevent regression in the variance of standard library types leading to accidental breaking changes in the API. This PR adds this attribute to the definitions of many std wrapper types to this end.
Closes rust-lang#163513
r? mejrs
…usl, r=folkertdev tests: Ignore dynamic-loading-cdylib on musl hosts This test assumes that dlclose runs the destructors of thread locals and is more than the no-op implementation that musl provides. There is not a lot of value in this test on musl hosts, so ignoring it seems appropriate to me. See https://wiki.musl-libc.org/functional-differences-from-glibc.html#Unloading-libraries for more details on dlclose in musl.
…tests, r=Urgau More `tests/rustdoc-html` cleanups Another cleanup. :) r? @Urgau
…-in-binary, r=Urgau tests: cover `dead_code_pub_in_binary` expectations with `--test` tracking issue: rust-lang#159078 add ui tests covering `#![expect(dead_code_pub_in_binary)]` across library and binary crates, with and without `--test`, including test builds without an explicit crate type. the library `--test` case documents the current behavior where the lint expectation is fulfilled despite `--crate-type=lib`, with a `FIXME` for follow-up work. **test-only change; no lint behavior is modified.** r? @Urgau
|
@bors r+ p=5 force |
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 e9bbadf (parent) -> 88d9824 (this PR) Test differencesShow 308 test diffsStage 1
Stage 2
Additionally, 234 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 88d982422ac482951195284e27f5bcb0d28f298b --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 (88d9824): comparison URL. Overall result: ❌✅ regressions and improvements - 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 (primary 1.2%, secondary 1.3%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (primary 3.5%, secondary -0.0%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeResults (primary 0.0%, secondary 0.1%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Bootstrap: 490.497s -> 512.754s (4.54%) |
|
📌 Perf builds for each rolled up PR:
parent commit: e9bbadf682 In the case of a perf regression, run the following command with the SHAs of each PR you suspect might be the cause: |
Successful merges:
tests/rustdoc-htmlcleanups #164171 (Moretests/rustdoc-htmlcleanups)dead_code_pub_in_binaryexpectations with--test#164221 (tests: coverdead_code_pub_in_binaryexpectations with--test)r? @ghost
Create a similar rollup