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 10 pull requests #120121

Merged
merged 41 commits into from
Jan 19, 2024
Merged

Rollup of 10 pull requests #120121

merged 41 commits into from
Jan 19, 2024

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

GnomedDev and others added 30 commits December 10, 2023 11:36
I done this for this reasons:
1. The example now shows that there is more Orderings than just SeqCst.
2. People who would copy from example would now have more suitable orderings for the job.
3. SeqCst is both much harder to reason about and not needed in most situations.

IMHO, we should encourage people to think and use memory orderings that is suitable to task instead of blindly defaulting to SeqCst.
This way all the other macros defined in this module, such as
nonzero_leading_trailing_zeros, are available to call within the expansion of
nonzero_integers.

(Macros defined by macro_rules cannot be called from the same module above the
location of the macro_rules.)

In this commit the ability to call things like nonzero_leading_trailing_zeros is
not immediately used, but later commits in this stack will be consolidating the
entire API of NonZeroT to be generated through nonzero_integers, and will need
to make use of some of the other macros to do that.
Later in this stack, as the nonzero_integers macro is going to be
responsible for producing a larger fraction of the API for the NonZero
integer types, it will need to receive a number of additional arguments
beyond the ones currently seen here.

Additional arguments, especially named arguments across multiple lines,
will turn out clearer if everything in one macro call is for the same
NonZero type.

This commit adopts a similar arrangement to what we do for generating
the API of the integer primitives (`impl u8` etc), which also generate a
single type's API per top-level macro call, rather than generating all
12 impl blocks for the 12 types from one macro call.
…mpls

The `key = $value` style will be beneficial as we introduce some more
macro arguments here in later commits.
    tidy error: /git/rust/library/core/src/num/nonzero.rs:67: malformed stability attribute: missing `feature` key
    tidy error: /git/rust/library/core/src/num/nonzero.rs:82: malformed stability attribute: missing `feature` key
    tidy error: /git/rust/library/core/src/num/nonzero.rs:98: malformed stability attribute: missing the `since` key
    tidy error: /git/rust/library/core/src/num/nonzero.rs:112: malformed stability attribute: missing `feature` key
    tidy error: /git/rust/library/core/src/num/nonzero.rs:450: malformed stability attribute: missing `feature` key
    some tidy checks failed
`repr(transparent)` now silences the lint.
`repr(transparent)` now silences the lint.
@rustbot rustbot added the rollup A PR which is a rollup label Jan 19, 2024
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=10

@bors
Copy link
Contributor

bors commented Jan 19, 2024

📌 Commit b4616f5 has been approved by matthiaskrgr

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 19, 2024
@bors
Copy link
Contributor

bors commented Jan 19, 2024

⌛ Testing commit b4616f5 with merge 34937ff...

bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 19, 2024
…iaskrgr

Rollup of 10 pull requests

Successful merges:

 - rust-lang#118665 (Consolidate all associated items on the NonZero integer types into a single impl block per type)
 - rust-lang#118798 (Use AtomicU8 instead of AtomicUsize in backtrace.rs)
 - rust-lang#119062 (Deny braced macro invocations in let-else)
 - rust-lang#119138 (Docs: Use non-SeqCst in module example of atomics)
 - rust-lang#119907 (Update `fn()` trait implementation docs)
 - rust-lang#120083 (Warn when not having a profiler runtime means that coverage tests won't be run/blessed)
 - rust-lang#120107 (dead_code treats #[repr(transparent)] the same as #[repr(C)])
 - rust-lang#120110 (Update documentation for Vec::into_boxed_slice to be more clear about excess capacity)
 - rust-lang#120113 (Remove myself from review rotation)
 - rust-lang#120118 (Fix typo in documentation in base.rs)

r? `@ghost`
`@rustbot` modify labels: rollup
@matthiaskrgr matthiaskrgr reopened this Jan 19, 2024
@matthiaskrgr
Copy link
Member Author

bors r+

@rust-log-analyzer
Copy link
Collaborator

A job failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)

@matthiaskrgr
Copy link
Member Author

@bors r-

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jan 19, 2024
@matthiaskrgr
Copy link
Member Author

@bors r+

@bors
Copy link
Contributor

bors commented Jan 19, 2024

📌 Commit b4616f5 has been approved by matthiaskrgr

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jan 19, 2024
@bors
Copy link
Contributor

bors commented Jan 19, 2024

⌛ Testing commit b4616f5 with merge 32ec40c...

@bors
Copy link
Contributor

bors commented Jan 19, 2024

☀️ Test successful - checks-actions
Approved by: matthiaskrgr
Pushing 32ec40c to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jan 19, 2024
@bors bors merged commit 32ec40c into rust-lang:master Jan 19, 2024
23 checks passed
@rustbot rustbot added this to the 1.77.0 milestone Jan 19, 2024
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#118665 Consolidate all associated items on the NonZero integer typ… 9bbd58cd2692de9391f36770fe31efe453b19834 (link)
#118798 Use AtomicU8 instead of AtomicUsize in backtrace.rs 68091e5f677abc01b5287bcf5004d17d20eb4493 (link)
#119062 Deny braced macro invocations in let-else 81756069983a9a9733b0d3637d7469f42c2f8c92 (link)
#119138 Docs: Use non-SeqCst in module example of atomics 291b6e81b8f8471cafb4f68fa6356ce0f7712cbd (link)
#119907 Update fn() trait implementation docs 6732919411ed149491520a0411bdf6640e91c5c5 (link)
#120083 Warn when not having a profiler runtime means that coverage… b85df7782a124a9ef01b35194e6e1f61d189b59f (link)
#120107 dead_code treats #[repr(transparent)] the same as #[repr(C)] 746c93f325cbfad670f63c197c1901bb9453b7c3 (link)
#120110 Update documentation for Vec::into_boxed_slice to be more c… 3e68b9767f0e94f7d9116ee9dc1e9fe33f58b565 (link)
#120113 Remove myself from review rotation 1c96ca0d0a9c0371fc1c9a43866d2463592995f3 (link)
#120118 Fix typo in documentation in base.rs 4efc494e937b5022be7ecca9b224b99418e545ef (link)

previous master: 92d727796b

In the case of a perf regression, run the following command for each PR you suspect might be the cause: @rust-timer build $SHA

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (32ec40c): comparison URL.

Overall result: ❌ regressions - no action needed

@rustbot label: -perf-regression

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
0.6% [0.6%, 0.6%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
1.4% [1.4%, 1.4%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 1.4% [1.4%, 1.4%] 1

Cycles

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-3.2% [-4.0%, -2.8%] 3
All ❌✅ (primary) - - 0

Binary size

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

Bootstrap: 665.984s -> 664.714s (-0.19%)
Artifact size: 308.33 MiB -> 308.27 MiB (-0.02%)

@matthiaskrgr matthiaskrgr deleted the rollup-razammh branch March 16, 2024 18:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-meta Area: Issues & PRs about the rust-lang/rust repository itself A-testsuite Area: The testsuite used to check the correctness of rustc 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-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.