Rollup of 6 pull requests#157320
Conversation
…omatsakis transmute: fix check for whether newtypes have equal size The `transmute` check has some logic to be able to tell whether two types that involve generics will always have the same size. That logic has a bug: it ignores the fact that `repr(align)` can affect the size of a type. This PR fixes that bug by making the check bail out for most `repr` flags. That rejects some previously accepted code, hence the @rust-lang/lang nomination. The new logic says that a type is a transparent newtype wrapper around a pointer for `transmute` purposes only if - It is a struct without any `repr` flags except for `repr(transparent)` and `repr(C)`. - It is a single-variant enum without any `repr` flags except for `repr(transparent)`. - Or it is a two-variant enum without any `repr` flags except for `repr(transparent)` that matches the NPO rules. The inner type must be `non_zero: true` (which holds for references and `NonNull`), and the wrapper type is then marked as `non_zero: false`. Fixes rust-lang#155412 Fixes rust-lang#88290 I manually checked that the playground example linked in rust-lang#88290 now emits all three expected errors (and we have equivalent cases in the tests, either preexisting or added by this PR, so it didn't seem worth adding that example as well).
…on-note, r=nikomatsakis Clarify E0381 diagnostics for branch conditions this pr want to fix: rust-lang#156494
…nal-deps, r=nikomatsakis Document run-make external dependencies Part of rust-lang#125585. This documents the common external tool helpers available to run-make recipes and the environment variables that compiletest uses to provide those tools. It also points tests that require optional tools or LLVM components toward the relevant compiletest directives. Validation: - `./x test tidy`
…r=cjgillot Avoid `unreachable_code` on required return values This PR skips return-place assignment plumbing when selecting user code to lint after an uninhabited call. Fixes rust-lang#152559 r? cjgillot
make typing mode exhaustive again... r? @oli-obk See rust-lang#155443 (comment)
…onathanBrouwer disallow most attrs on eiis Most attributes do not make sense on EIIs. Whether they're copied to the macro, default, or foreign item is also highly dependent per attribute. I was thinking of ways to configure this, though I don't think we need that kind of complexity rn. For now I just reject them all, except for ones that obviously make sense or are necessary for current usage in std. user attr macros are blanket-rejected with this too, which seems good, it seems cursed to present expanded eiis to them. r? @JonathanBrouwer
|
@bors r+ rollup=never p=5 |
This comment has been minimized.
This comment has been minimized.
…uwer Rollup of 6 pull requests Successful merges: - #155418 (transmute: fix check for whether newtypes have equal size) - #156603 (Clarify E0381 diagnostics for branch conditions) - #156643 (Document run-make external dependencies) - #157009 (Avoid `unreachable_code` on required return values) - #157308 (make typing mode exhaustive again...) - #157312 (disallow most attrs on eiis)
|
💔 Test for f21b86e failed: CI. Failed job:
|
|
@bors retry |
This comment has been minimized.
This comment has been minimized.
|
A job failed! Check out the build log: (web) (plain enhanced) (plain) Click to see the possible cause of the failure (guessed by this bot) |
|
📌 Perf builds for each rolled up PR:
previous master: 48f976c713 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 48f976c (parent) -> 20e19ee (this PR) Test differencesShow 34 test diffsStage 1
Stage 2
Additionally, 26 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 20e19eeac0c548e31f84d3914e0ce17cde618119 --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 (20e19ee): comparison URL. Overall result: ❌✅ regressions and improvements - please read:Our benchmarks found a performance regression caused by this PR. Next Steps:
@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 2.3%, secondary 0.4%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (primary 0.1%, secondary 0.3%)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: 510.698s -> 511.673s (0.19%) |
Successful merges:
unreachable_codeon required return values #157009 (Avoidunreachable_codeon required return values)r? @ghost
Create a similar rollup