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 8 pull requests #134184

Closed
wants to merge 19 commits into from

Conversation

GuillaumeGomez
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

mati865 and others added 19 commits October 3, 2024 22:59
Co-authored-by: Kleis Auke Wolthuizen <github@kleisauke.nl>
Unit tests directly inside of standard library crates require a very
fragile way of building that is hard to reproduce outside of bootstrap.
Without a lockfile, it could fail to compile when the dependencies have changed.
Adding it did not cause any error. Most of this falls back on Unix already.

See rust-lang#127747
Signed-off-by: onur-ozkan <work@onurozkan.dev>
Signed-off-by: onur-ozkan <work@onurozkan.dev>
…=petrochenkov

link libunwind dynamically and allow controlling it via `crt-static` on gnullvm targets

Alternative to rust-lang#121794

```
$ cargo b -r
    Finished `release` profile [optimized] target(s) in 0.38s

$ ntldd target/release/hello.exe | rg unwind
        libunwind.dll => H:\msys64\clang64\bin\libunwind.dll (0x0000020c35df0000)

$ RUSTFLAGS="-C target-feature=+crt-static" cargo b -r
    Finished `release` profile [optimized] target(s) in 0.23s

$ ntldd target/release/hello.exe | rg unwind
```
Add unpolished, experimental support for AFIDT (async fn in dyn trait)

This allows us to begin messing around `async fn` in `dyn Trait`. Calling an async fn from a trait object always returns a `dyn* Future<Output = ...>`.

To make it work, Implementations are currently required to return something that can be coerced to a `dyn* Future` (see the example in `tests/ui/async-await/dyn/works.rs`). If it's not the right size, then it'll raise an error at the coercion site (see the example in `tests/ui/async-await/dyn/wrong-size.rs`). Currently the only practical way of doing this is wrapping the body in `Box::pin(async move { .. })`.

This PR does not implement a helper type like a "`Boxing`"[^boxing] adapter, and I'll probably follow-up with another PR to improve the error message for the `PointerLike` trait (something that explains in just normal prose what is happening here, rather than a trait error).
[^boxing]: https://rust-lang.github.io/async-fundamentals-initiative/explainer/user_guide_future.html#the-boxing-adapter

This PR also does not implement new trait solver support for AFIDT; I'll need to think how best to integrate it into candidate assembly, and that's a bit of a matter of taste, but I don't think it will be difficult to do.

This could also be generalized:
* To work on functions that are `-> impl Future` (soon).
* To work on functions that are `-> impl Iterator` and other "dyn rpitit safe" traits. We still need to nail down exactly what is needed for this to be okay (not soon).

Tracking:
* rust-lang#133119
…=tgross35

Move some alloc tests to the alloctests crate

Unit tests directly inside of standard library crates require a very fragile way of building that is hard to reproduce outside of bootstrap.
[CI] Use a lockfile for installing the `datadog` package

Without a lockfile, it could fail to compile when the dependencies have changed. Reported [here](https://rust-lang.zulipchat.com/#narrow/channel/242791-t-infra/topic/CI.20failure.20in.20DataDog.20upload).

r? `@jdno`
…=tgross35

Forbid `unsafe_op_in_unsafe_fn` for Hurd

Tracking issue rust-lang#127747
…ing-literal, r=jieyouxu

allow `symbol_intern_string_literal` lint in test modules

Since rust-lang#133545, `x check compiler --stage 1` no longer works because compiler test modules trigger `symbol_intern_string_literal` lint errors. Bootstrap shouldn't control when to ignore or enable this lint in the compiler tree (using `Kind != Test` was ineffective for obvious reasons).

Also, conditionally adding this rustflag invalidates the build cache between `x test` and other commands.

This PR removes the `Kind` check from bootstrap and handles it directly in the compiler tree in a more natural way.
…anieu,traviscross,tgross35

Stabilize the Rust 2024 prelude

This stabilizes the `core::prelude::rust_2024` and `std::prelude::rust_2024` modules. I missed these in the rust-lang#133349 stabilization.
…r=workingjubilee

Remove outdated consteval note from `<*mut T>::align_offset` docs.
@rustbot rustbot added A-testsuite Area: The testsuite used to check the correctness of rustc 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-infra Relevant to the infrastructure 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 Dec 11, 2024
@GuillaumeGomez
Copy link
Member Author

@bors r+ rollup=never p=8

@bors
Copy link
Contributor

bors commented Dec 11, 2024

📌 Commit 7a4becc has been approved by GuillaumeGomez

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 Dec 11, 2024
@bors
Copy link
Contributor

bors commented Dec 12, 2024

⌛ Testing commit 7a4becc with merge 11be577...

bors added a commit to rust-lang-ci/rust that referenced this pull request Dec 12, 2024
…llaumeGomez

Rollup of 8 pull requests

Successful merges:

 - rust-lang#122003 (link libunwind dynamically and allow controlling it via `crt-static` on gnullvm targets)
 - rust-lang#133122 (Add unpolished, experimental support for AFIDT (async fn in dyn trait))
 - rust-lang#133859 (Move some alloc tests to the alloctests crate)
 - rust-lang#134095 ([CI] Use a lockfile for installing the `datadog` package)
 - rust-lang#134155 (Forbid `unsafe_op_in_unsafe_fn` for Hurd)
 - rust-lang#134173 (allow `symbol_intern_string_literal` lint in test modules)
 - rust-lang#134178 (Stabilize the Rust 2024 prelude)
 - rust-lang#134179 (Remove outdated consteval note from `<*mut T>::align_offset` docs.)

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

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

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

found 0 vulnerabilities
Metric avg-cpu-usage: 80.5968
Traceback (most recent call last):
  File "D:\a\rust\rust\src\ci\scripts\upload-build-metrics.py", line 68, in <module>
    upload_datadog_measure("avg-cpu-usage", avg_cpu_usage)
  File "D:\a\rust\rust\src\ci\scripts\upload-build-metrics.py", line 51, in upload_datadog_measure
  File "C:\hostedtoolcache\windows\Python\3.9.13\x64\lib\subprocess.py", line 505, in run
  File "C:\hostedtoolcache\windows\Python\3.9.13\x64\lib\subprocess.py", line 505, in run
    with Popen(*popenargs, **kwargs) as process:
  File "C:\hostedtoolcache\windows\Python\3.9.13\x64\lib\subprocess.py", line 951, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "C:\hostedtoolcache\windows\Python\3.9.13\x64\lib\subprocess.py", line 1420, in _execute_child
    hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] The system cannot find the file specified
##[error]Process completed with exit code 1.
[command]"C:\Program Files\Git\bin\git.exe" version
git version 2.47.1.windows.1
Temporarily overriding HOME='D:\a\_temp\c530da85-0915-4c9c-9bb7-29d56247a1bd' before making global git config changes
Adding repository directory to the temporary git global config as a safe directory

@bors
Copy link
Contributor

bors commented Dec 12, 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 Dec 12, 2024
@GuillaumeGomez
Copy link
Member Author

Seems like a flaky error. Closing.

@GuillaumeGomez GuillaumeGomez deleted the rollup-vne64k4 branch December 12, 2024 09:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc rollup A PR which is a rollup 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-infra Relevant to the infrastructure 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.