Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 7 pull requests #99422

Merged
merged 15 commits into from
Jul 18, 2022
Merged

Rollup of 7 pull requests #99422

merged 15 commits into from
Jul 18, 2022

Conversation

Dylan-DPC
Copy link
Member

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

5225225 and others added 15 commits July 3, 2022 10:46
We can apply nocf_check as a hack for now.
Signed-off-by: Yuki Okushi <jtitor@2k36.org>
… r=thomcc

Add assertion that `transmute_copy`'s U is not larger than T

This is called out as a safety requirement in the docs, but because knowing this can be done at compile time and constant folded (just like the `align_of` branch is removed), we can just panic here.

I've looked at the asm (using `cargo-asm`) of a function that both is correct and incorrect, and the panic is completely removed, or is unconditional, without needing build-std.

I don't expect this to cause much breakage in the wild. I scanned through https://miri.saethlin.dev/ub for issues that would look like this (error: Undefined Behavior: memory access failed: alloc1768 has size 1, so pointer to 8 bytes starting at offset 0 is out-of-bounds), but couldn't find any.

That doesn't rule out it happening in crates tested that fail earlier for some other reason, though, but it indicates that doing this is rare, if it happens at all. A crater run for this would need to be build and test, since this is a runtime thing.

Also added a few more transmute_copy tests.
…es-enforcement-technology, r=Amanieu

Remove branch target prologues from `#[naked] fn`

This patch hacks around rust-lang#98768 for now via injecting appropriate attributes into the LLVMIR we emit for naked functions. I intend to pursue this upstream so that these attributes can be removed in general, but it's slow going wading through C++ for me.
add missing null ptr check in alloc example

`alloc` can return null on OOM, if I understood correctly. So we should never just deref a pointer we get from `alloc`.
…rules-w-same-name, r=GuillaumeGomez

rustdoc: avoid inlining items with duplicate `(type, name)`

Fixes rust-lang#99221
… r=davidtwco

Use `typeck_results` to get accurate qpath res for arg mismatch error

Improves error message from "function"  to actually what we're calling (e.g. enum variant constrcutor) in a few cases 😸
interpret/visitor: add missing early return

I forgot to add this when adding the special `Box` handling branch.

r? ```@oli-obk```
…rrors

Add regression test for rust-lang#95230

Closes rust-lang#95230
r? ```@compiler-errors```

Signed-off-by: Yuki Okushi <jtitor@2k36.org>
@rustbot rustbot added T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. rollup A PR which is a rollup labels Jul 18, 2022
@Dylan-DPC
Copy link
Member Author

@bors r+ rollup=never p=5

@bors
Copy link
Contributor

bors commented Jul 18, 2022

📌 Commit 068a559 has been approved by Dylan-DPC

It is now in the queue for this repository.

@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Jul 18, 2022
@bors
Copy link
Contributor

bors commented Jul 18, 2022

⌛ Testing commit 068a559 with merge f858854...

@bors
Copy link
Contributor

bors commented Jul 18, 2022

☀️ Test successful - checks-actions
Approved by: Dylan-DPC
Pushing f858854 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jul 18, 2022
@bors bors merged commit f858854 into rust-lang:master Jul 18, 2022
@rustbot rustbot added this to the 1.64.0 milestone Jul 18, 2022
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (f858854): comparison url.

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results
  • Primary benchmarks: 😿 relevant regressions found
  • Secondary benchmarks: 🎉 relevant improvements found
mean1 max count2
Regressions 😿
(primary)
1.7% 2.1% 2
Regressions 😿
(secondary)
N/A N/A 0
Improvements 🎉
(primary)
N/A N/A 0
Improvements 🎉
(secondary)
-2.4% -2.8% 3
All 😿🎉 (primary) 1.7% 2.1% 2

Cycles

Results
  • Primary benchmarks: 😿 relevant regression found
  • Secondary benchmarks: no relevant changes found
mean1 max count2
Regressions 😿
(primary)
2.2% 2.2% 1
Regressions 😿
(secondary)
N/A N/A 0
Improvements 🎉
(primary)
N/A N/A 0
Improvements 🎉
(secondary)
N/A N/A 0
All 😿🎉 (primary) 2.2% 2.2% 1

If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf.

@rustbot label: -perf-regression

Footnotes

  1. the arithmetic mean of the percent change 2

  2. number of relevant changes 2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. rollup A PR which is a rollup S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants