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 #126002

Closed
wants to merge 23 commits into from
Closed

Rollup of 7 pull requests #126002

wants to merge 23 commits into from

Conversation

fmease
Copy link
Member

@fmease fmease commented Jun 4, 2024

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

raoulstrackx and others added 23 commits May 30, 2024 16:16
Unlike static declarations with #[linkage], for definitions rustc
doesn't rewrite it to add an extra indirection.
This is the counterpart of `Span::trim_start`.
This will allow the span extractor to produce multiple separate buckets,
instead of just one flat list of spans.
This is less elegant than returning an iterator, but more flexible.
…kets

This performs the same task as the hole-carving code in the main span refiner,
but in a separate earlier pass.
Now that hole spans are handled by a separate earlier pass, this code never
sees hole spans, and therefore doesn't need to deal with them.
Some of the bootstrap logics should be ignored during unit tests because they either
make the tests take longer or cause them to fail. Therefore we need to be able to exclude
them from the bootstrap when it's called by unit tests. This change introduces a new feature
called `bootstrap-self-test`, which is enabled on bootstrap unit tests by default. This allows
us to keep the logic separate between compiler builds and bootstrap tests without needing messy
workarounds (like checking if target names match those in the unit tests).

Signed-off-by: onur-ozkan <work@onurozkan.dev>
…albertlarsan68

bootstrap: implement new feature `bootstrap-self-test`

Some of the bootstrap logics should be ignored during unit tests because they either make the tests take longer or cause them to fail. Therefore we need to be able to exclude them from the bootstrap when it's called by unit tests. This change introduces a new feature called `bootstrap-self-test`, which is enabled on bootstrap unit tests by default. This allows us to keep the logic separate between compiler builds and bootstrap tests without needing messy workarounds (like checking if target names match those in the unit tests).

Also, resolves rust-lang#122090 (without having to create separate modules)
…ic_task_queue, r=jethrogb

Fix `mut` static task queue in SGX target

[PR 125046](rust-lang#125046) prevents mutable references to statics with `#[linkage]`. Such a construct was used with the tests for the `x86_64-fortanix-unknown-sgx` target. This PR fixes this and cleans up code a bit in 5 steps. Each step passes CI:

- The `mut` static is removed, and `Task` explicitly implements `Send`
- Renaming of the `task_queue::lock` function
- Pass function for `Thread` as `Send` to `Thread::imp` and update when `Packet<'scope, T>` implements `Sync`
- Storing `Task::p` as a type that implements `Send`
- Letting the compiler auto implement `Send` for `Task`

cc: `@jethrogb`
rustc_span: Inline some hot functions

Found while benchmarking rust-lang#125829.
…f, r=Urgau

Allow static mut definitions with #[linkage]

Unlike static declarations with #[linkage], for definitions rustc doesn't rewrite it to add an extra indirection.

This was accidentally disallowed in rust-lang#125046.

cc rust-lang#125800 (comment)
coverage: Carve out hole spans in a separate early pass

When extracting spans from MIR for use in coverage instrumentation, we sometimes need to identify *hole spans* (currently just closures), and carve up the other spans so that they don't overlap with holes.

This PR simplifies the main coverage-span-refiner by extracting the hole-carving process into a separate early pass. That pass produces a series of independent buckets, and we run the span-refiner on each bucket separately.

There is almost no difference in the resulting mappings, other than in some edge cases involving macros.
…trieb

Use inline const blocks to create arrays of `MaybeUninit`.

This PR contains 2 changes enabled by the fact that [`inline_const` is now stable](rust-lang#104087), and was split out of rust-lang#125082.

1. Use inline const instead of `unsafe` to construct arrays in `MaybeUninit` examples.

   Rationale: Demonstrate good practice of avoiding `unsafe` code where it is not strictly necessary.

4. Use inline const instead of `unsafe` to implement `MaybeUninit::uninit_array()`.

    This is arguably giving the compiler more work to do, in exchange for eliminating just one single internal unsafe block, so it's less certain that this is good on net.

r​? `@Nilstrieb`
…ble, r=oli-obk

Closures are recursively reachable
@rustbot rustbot added O-SGX Target: SGX S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. 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. rollup A PR which is a rollup labels Jun 4, 2024
@fmease
Copy link
Member Author

fmease commented Jun 4, 2024

@bors r+ rollup=never p=7

@bors
Copy link
Contributor

bors commented Jun 4, 2024

📌 Commit a82d14b has been approved by fmease

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 Jun 4, 2024
@bors
Copy link
Contributor

bors commented Jun 5, 2024

⌛ Testing commit a82d14b with merge 01ecf57...

bors added a commit to rust-lang-ci/rust that referenced this pull request Jun 5, 2024
Rollup of 7 pull requests

Successful merges:

 - rust-lang#125273 (bootstrap: implement new feature `bootstrap-self-test`)
 - rust-lang#125800 (Fix `mut` static task queue in SGX target)
 - rust-lang#125903 (rustc_span: Inline some hot functions)
 - rust-lang#125920 (Allow static mut definitions with #[linkage])
 - rust-lang#125921 (coverage: Carve out hole spans in a separate early pass)
 - rust-lang#125995 (Use inline const blocks to create arrays of `MaybeUninit`.)
 - rust-lang#125996 (Closures are recursively reachable)

r? `@ghost`
`@rustbot` modify labels: rollup
@rust-log-analyzer
Copy link
Collaborator

The job x86_64-msvc-ext failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
Verifying status of rust-by-example...
Verifying status of edition-guide...
Verifying status of embedded-book...
Cloning into 'rust-toolstate'...
ERROR: Tool `nomicon` has regressed from test-pass to test-fail during beta week.
  local time: Wed, Jun  5, 2024  1:12:59 AM
  network time: Wed, 05 Jun 2024 01:12:59 GMT
##[error]Process completed with exit code 1.
Post job cleanup.

@bors
Copy link
Contributor

bors commented Jun 5, 2024

💔 Test failed - checks-actions

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

fmease commented Jun 5, 2024

ERROR: Tool `nomicon` has regressed from test-pass to test-fail during beta week.
local time: Wed, Jun  5, 2024  1:12:59 AM
network time: Wed, 05 Jun 2024 01:12:59 GMT

@ehuss, help what do I need to do?? :O

@fmease
Copy link
Member Author

fmease commented Jun 5, 2024

@bors retry (for now)

@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 Jun 5, 2024
@ehuss
Copy link
Contributor

ehuss commented Jun 5, 2024

I'll see if I can get it fixed. It might be nothing can merge at the moment. I'll double check with the current PR being tested, and close the tree if it fails.

@ehuss
Copy link
Contributor

ehuss commented Jun 5, 2024

Well, #125958 failed for other reasons...

@ehuss
Copy link
Contributor

ehuss commented Jun 5, 2024

#126007 is now up. If you don't want to wait an hour, you can retry #126001 to kick it out of the top spot in the queue.

@fmease
Copy link
Member Author

fmease commented Jun 5, 2024

yea let's retry the other rollup. thanks Eric <3

@workingjubilee
Copy link
Member

the queue has... grown.
@bors r-

@fmease fmease deleted the rollup-ehb7lhs branch June 5, 2024 14:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
O-SGX Target: SGX 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.