Rollup of 7 pull requests#157999
Conversation
This modifies the &mut -> &mut CoerceUnsized impl so that, it can
shorten the lifetime.
Note that there are already two impls that allow shortening the lifetime
like this (the &mut T -> &U and the &T -> &U impls). So this change
makes the impls consistent with each other.
I initially tried to also do the same to the CoerceUnsized impl for
core::cell::{Ref, RefMut}. However, this can't be done because
Ref and RefMut "store" the lifetime and the data in different fields,
and CoerceUnsized can only coerce one field.
This change has an effect on stable code, since it allows shortening
lifetimes inside invariant types via a &mut -> &mut unsize coercion.
Per naming bikeshed in libs-api. `Rng` is shorter, and already established in the ecosystem. `System` makes it self-documenting that `SystemRng` gets its randomness from the system RNG.
This patch updates `incremental-finalize-fail` on AIX by making the test's proc-macro lookup to use the `.a` extension. The test previously assumed that non-macOS, non-Windows targets produce a `.so` proc-macro artifact. On AIX, the artifact is `libpoison.a`, which causes the test to fail as it isn't able to find the proc-macro dylib for poison.
The cdylib export-symbols test was checking for `T my_function` on all non-Darwin targets, but AIX prints the exported symbol as `T .my_function`. This patch updates the test to account for the AIX behavior so the test validates the actual exported symbol correctly.
This attribute enables or disables function instrumentation when using `-Zinstrument-xray` or `-Zinstrument-mcount`. It supports the following usage: `#[instrument_fn = "on|off"]` For XRay, "on" is equivalent to always instrument, and "off" is equivalent to never instrumenting. For mcount, "on" has no effect. "off" disables instrumentation of the function.
…r=oli-obk,mejrs Add instrument_fn attribute This attribute enables or disables function instrumentation when using `-Zinstrument-xray` or `-Zinstrument-mcount`. It supports the following usage: `#[instrument_fn = "on|off"]` For XRay, "on" is equivalent to always instrument, and "off" is equivalent to never instrumenting. For mcount, "on" has no effect. "off" disables instrumentation of the function. This is tracked by rust-lang#157081, and related to the pending rfc rust-lang/rfcs#3917, and earlier as part mcp rust-lang/compiler-team#561
… r=jackh726
Allow shortening lifetime in CoerceUnsized for &mut
This modifies the &mut -> &mut CoerceUnsized impl so that, it can shorten the lifetime.
Note that there are already two impls that allow shortening the lifetime like this (the &mut T -> &U and the &T -> &U impls). So this change makes the impls consistent with each other.
I initially tried to also do the same to the CoerceUnsized impl for core::cell::{Ref, RefMut}. However, this can't be done because Ref and RefMut "store" the lifetime and the data in different fields, and CoerceUnsized can only coerce one field.
This change has an effect on stable code, since it allows shortening lifetimes inside invariant types via a &mut -> &mut unsize coercion.
… r=jhpratt Rename `RandomSource` -> `Rng`, `DefaultRandomSource` -> `SystemRng` Per naming bikeshed in libs-api. `Rng` is shorter, and already established in the ecosystem. `System` makes it self-documenting that `SystemRng` gets its randomness from the system RNG. This also makes it short and convenient to write `SystemRng.fill_bytes`, rather than `DefaultRandomSource.fill_bytes`.
Some minor cleanups around hir ty/pat/expr Just some avenues for deduplication that I noticed. Also makes sure we handle all three everywhere instead of just ty/expr like the diagnostic code previously did.
…lize-fail-test, r=folkertdev Fix incremental-finalize-fail proc macro test on AIX This patch updates `incremental-finalize-fail` on AIX by making the test's proc-macro lookup to use the `.a` extension. The test previously assumed that non-macOS, non-Windows targets produce a `.so` proc-macro artifact. On AIX, the artifact is `libpoison.a`, which causes the test to fail as it isn't able to find the proc-macro dylib for poison.
…nethercote run-make: handle AIX symbol cdylib export test The cdylib export-symbols test was checking for `T my_function` on all non-Darwin targets, but AIX prints the exported symbol as `T .my_function`. This patch updates the test to account for the AIX behavior so the test validates the actual exported symbol correctly.
…ds-disclaimer, r=mu001999 Add big disclaimer to the description of lint `explicit_outlives_requirements`
|
@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: 1c0f17520a 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 1c0f175 (parent) -> 98594f4 (this PR) Test differencesShow 393 test diffsStage 1
Stage 2
Additionally, 380 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 98594f404ee741f97fefbae4aca049cde911bc94 --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 (98594f4): 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 -3.2%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (secondary -2.1%)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: 523.093s -> 523.739s (0.12%) |
Successful merges:
RandomSource->Rng,DefaultRandomSource->SystemRng#157539 (RenameRandomSource->Rng,DefaultRandomSource->SystemRng)explicit_outlives_requirements#157998 (Add big disclaimer to the description of lintexplicit_outlives_requirements)r? @ghost
Create a similar rollup