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

Merged
merged 25 commits into from
Jul 2, 2024
Merged

Rollup of 10 pull requests #127244

merged 25 commits into from
Jul 2, 2024

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

dtolnay and others added 25 commits June 23, 2024 17:17
This should prevent the default fallback if we add more float types in the
future.
The `load` and `store` instructions in LLVM access the aligned size.
Parenthesize break values containing leading label

The AST pretty printer previously produced invalid syntax in the case of `break` expressions with a value that begins with a loop or block label.

```rust
macro_rules! expr {
    ($e:expr) => {
        $e
    };
}

fn main() {
    loop {
        break expr!('a: loop { break 'a 1; } + 1);
    };
}
```

`rustc -Zunpretty=expanded main.rs `:

```console
#![feature(prelude_import)]
#![no_std]
#[prelude_import]
use ::std::prelude::rust_2015::*;
#[macro_use]
extern crate std;
macro_rules! expr { ($e:expr) => { $e }; }

fn main() { loop { break 'a: loop { break 'a 1; } + 1; }; }
```

The expanded code is not valid Rust syntax. Printing invalid syntax is bad because it blocks `cargo expand` from being able to format the output as Rust syntax using rustfmt.

```console
error: parentheses are required around this expression to avoid confusion with a labeled break expression
 --> <anon>:9:26
  |
9 | fn main() { loop { break 'a: loop { break 'a 1; } + 1; }; }
  |                          ^^^^^^^^^^^^^^^^^^^^^^^^
  |
help: wrap the expression in parentheses
  |
9 | fn main() { loop { break ('a: loop { break 'a 1; }) + 1; }; }
  |                          +                        +
```

This PR updates the AST pretty-printer to insert parentheses around the value of a `break` expression as required to avoid this edge case.
…env-shim, r=oli-obk

Fix `FnMut::call_mut`/`Fn::call` shim for async closures that capture references

I adjusted async closures to be able to implement `Fn` and `FnMut` *even if* they capture references, as long as those references did not need to borrow data from the closure captures themselves. See rust-lang#125259.

However, when I did this, I didn't actually relax an assertion in the `build_construct_coroutine_by_move_shim` shim code, which builds the `Fn`/`FnMut`/`FnOnce` implementations for async closures. Therefore, if we actually tried to *call* `FnMut`/`Fn` on async closures, it would ICE.

This PR adjusts this assertion to ensure that we only capture immutable references in closures if they implement `Fn`/`FnMut`. It also adds a bunch of tests and makes more of the async-closure tests into `build-pass` since we often care about these tests actually generating the right closure shims and stuff. I think it might be excessive to *always* use build-pass here, but 🤷 it's not that big of a deal.

Fixes rust-lang#127019
Fixes rust-lang#127012

r? oli-obk
Uplift fast rejection to new solver

Self explanatory.

r? lcnr
Bootstrap: Try renaming the file if removing fails

Second attempt at working around rust-lang#127126

If we can't remove the file, then try renaming it. This will leave the destination path free to use.

try-job: x86_64-msvc-ext
Use the aligned size for alloca at args/ret when the pass mode is cast

Fixes rust-lang#75839. Fixes rust-lang#121028.

The `load` and `store` instructions in LLVM access the aligned size. For example, `load { i64, i32 }` accesses 16 bytes on x86_64: https://alive2.llvm.org/ce/z/n8CHAp.

BTW, this example is expected to be optimized to immediate UB by Alive2: https://rust.godbolt.org/z/b7xK7hv1c and https://alive2.llvm.org/ce/z/vZDtZH.

r? compiler
…t, r=Nadrieril

Fix import suggestion error when path segment failed not from starting

Fixes rust-lang#120074
Update books

## rust-lang/book

2 commits in 45c1a6d69edfd1fc91fb7504cb73958dbd09441e..f1e49bf7a8ea6c31ce016a52b8a4f6e1ffcfbc64
2024-06-25 21:12:15 UTC to 2024-06-20 16:10:32 UTC

- Update ch10-00-generics.md (rust-lang/book#3963)
- infra: ignore Nova configuration directory (rust-lang/book#3962)

## rust-lang/edition-guide

3 commits in cb58c430b4e8054c2cb81d2d4434092c482a93d8..941db8b3df45fd46cd87b50a5c86714b91dcde9c
2024-06-30 19:26:27 UTC to 2024-06-20 18:43:18 UTC

- Add a section for the never type change in e2024 (rust-lang/edition-guide#310)
- Add 2024 unsafe attributes. (rust-lang/edition-guide#308)
- Add 2024 unsafe extern blocks. (rust-lang/edition-guide#309)

## rust-lang/reference

7 commits in 0b805c65804019b0ac8f2fe3117afad82a6069b8..1ae3deebc3ac16e276b6558e01420f8e605def08
2024-06-29 16:59:51 UTC to 2024-06-18 22:16:37 UTC

- Provide an example of `target_family` being multi-valued (rust-lang/reference#1518)
- Remove stubs needed for the link checker. (rust-lang/reference#1517)
- Document new `#[expect]` attribute and `reasons` parameter (RFC 2383) (rust-lang/reference#1237)
- Update recognized tool attributes (rust-lang/reference#1498)
- Add example of 1-ary tuple type (rust-lang/reference#1514)
- underscore-expr: add more examples (rust-lang/reference#1478)
- Remove outdated info about impl Trait in parameters and generics in the same function (rust-lang/reference#1495)

## rust-lang/rust-by-example

4 commits in b1d97bd6113aba732b2091ce093c76f2d05bb8a0..658c6c27cb975b92227936024816986c2d3716fb
2024-06-30 11:58:29 UTC to 2024-06-30 11:52:38 UTC

- Remove awkward match in if_let (rust-lang/rust-by-example#1725)
- Edit grammatical mistake (rust-lang/rust-by-example#1830)
- Update paragraph in src/fn/diverging.md (rust-lang/rust-by-example#1853)
- Fix minor typo in from_into.md (rust-lang/rust-by-example#1854)

## rust-lang/rustc-dev-guide

11 commits in aec82168dd3121289a194b381f56076fc789a4d2..d6e3a32a557db5902e714604def8015d6bb7e0f7
2024-07-01 10:51:26 UTC to 2024-06-18 18:24:17 UTC

- Update new target check-cfg instructions (rust-lang/rustc-dev-guide#2006)
- Add Rust for Linux integration tests documentation (rust-lang/rustc-dev-guide#2004)
- Add docs for building Fuchsia locally and in CI (rust-lang/rustc-dev-guide#1989)
- provide `libstdc++.so.6` through `LD_LIBRARY_PATH` (rust-lang/rustc-dev-guide#1999)
- Document how to run `run-make` tests on Windows (rust-lang/rustc-dev-guide#2002)
- Document `needs-symlink` directive (rust-lang/rustc-dev-guide#2001)
- Rename `wasm32-wasi` to `wasm32-wasip1` (rust-lang/rustc-dev-guide#1678)
- Document inert vs active attributes (rust-lang/rustc-dev-guide#1110)
- Document hard-resetting submodules (rust-lang/rustc-dev-guide#2000)
- Fix note about compiletest header `rustfix-only-machine-applicable` (rust-lang/rustc-dev-guide#1998)
- Mention `RUSTC_ICE=0` to suppress ICE file (rust-lang/rustc-dev-guide#1997)
…r=RalfJung

Make `FloatTy` checks exhaustive in pretty print

This should prevent the default fallback if we add more float types in the future.
chore: remove duplicate words

remove duplicate words in comments to improve readability.
…_test, r=compiler-errors

Add test for adt_const_params

Fixes rust-lang#84238

r? `@compiler-errors`
@rustbot rustbot added O-unix Operating system: Unix-like O-windows Operating system: Windows 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. labels Jul 2, 2024
@rustbot rustbot added 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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) rollup A PR which is a rollup labels Jul 2, 2024
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=15

@bors
Copy link
Contributor

bors commented Jul 2, 2024

📌 Commit 6407580 has been approved by matthiaskrgr

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Jul 2, 2024

🌲 The tree is currently closed for pull requests below priority 100. This pull request will be tested once the tree is reopened.

@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 Jul 2, 2024
@bors
Copy link
Contributor

bors commented Jul 2, 2024

⌛ Testing commit 6407580 with merge 0b70292...

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

Rollup of 10 pull requests

Successful merges:

 - rust-lang#126883 (Parenthesize break values containing leading label)
 - rust-lang#127136 (Fix `FnMut::call_mut`/`Fn::call` shim for async closures that capture references)
 - rust-lang#127146 (Uplift fast rejection to new solver)
 - rust-lang#127152 (Bootstrap: Try renaming the file if removing fails)
 - rust-lang#127168 (Use the aligned size for alloca at args/ret when the pass mode is cast)
 - rust-lang#127203 (Fix import suggestion error when path segment failed not from starting)
 - rust-lang#127212 (Update books)
 - rust-lang#127224 (Make `FloatTy` checks exhaustive in pretty print)
 - rust-lang#127230 (chore: remove duplicate words)
 - rust-lang#127243 (Add test for adt_const_params)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors
Copy link
Contributor

bors commented Jul 2, 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 Jul 2, 2024
@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)
#2 transferring dockerfile: 790B done
#2 DONE 0.0s

#3 [internal] load metadata for docker.io/library/ubuntu:22.04
#3 ERROR: failed to copy: httpReadSeeker: failed open: unexpected status code https://registry-1.docker.io/v2/library/ubuntu/manifests/sha256:1d19c776e76cdb32dcc72cbd44a689c9be9518b9c4ed7f9a92b38f46176b931b: 429 Too Many Requests - Server message: toomanyrequests: You have reached your pull rate limit. You may increase the limit by authenticating and upgrading: https://www.docker.com/increase-rate-limit
 > [internal] load metadata for docker.io/library/ubuntu:22.04:
------
Dockerfile:1
--------------------
--------------------
   1 | >>> FROM ubuntu:22.04
   2 |     
   3 |     ARG DEBIAN_FRONTEND=noninteractive
--------------------
ERROR: failed to solve: ubuntu:22.04: failed to resolve source metadata for docker.io/library/ubuntu:22.04: failed to copy: httpReadSeeker: failed open: unexpected status code https://registry-1.docker.io/v2/library/ubuntu/manifests/sha256:1d19c776e76cdb32dcc72cbd44a689c9be9518b9c4ed7f9a92b38f46176b931b: 429 Too Many Requests - Server message: toomanyrequests: You have reached your pull rate limit. You may increase the limit by authenticating and upgrading: https://www.docker.com/increase-rate-limit
#0 building with "vigilant_volhard" instance using docker-container driver

#1 [internal] load build definition from Dockerfile
#1 transferring dockerfile: 790B done
#1 transferring dockerfile: 790B done
#1 DONE 0.0s

#2 [internal] load metadata for docker.io/library/ubuntu:22.04
#2 ERROR: failed to copy: httpReadSeeker: failed open: unexpected status code https://registry-1.docker.io/v2/library/ubuntu/manifests/sha256:1d19c776e76cdb32dcc72cbd44a689c9be9518b9c4ed7f9a92b38f46176b931b: 429 Too Many Requests - Server message: toomanyrequests: You have reached your pull rate limit. You may increase the limit by authenticating and upgrading: https://www.docker.com/increase-rate-limit
 > [internal] load metadata for docker.io/library/ubuntu:22.04:
------
Dockerfile:1
--------------------
--------------------
   1 | >>> FROM ubuntu:22.04
   2 |     
   3 |     ARG DEBIAN_FRONTEND=noninteractive
--------------------
ERROR: failed to solve: ubuntu:22.04: failed to resolve source metadata for docker.io/library/ubuntu:22.04: failed to copy: httpReadSeeker: failed open: unexpected status code https://registry-1.docker.io/v2/library/ubuntu/manifests/sha256:1d19c776e76cdb32dcc72cbd44a689c9be9518b9c4ed7f9a92b38f46176b931b: 429 Too Many Requests - Server message: toomanyrequests: You have reached your pull rate limit. You may increase the limit by authenticating and upgrading: https://www.docker.com/increase-rate-limit
#0 building with "vigilant_volhard" instance using docker-container driver

#1 [internal] load build definition from Dockerfile
#1 transferring dockerfile: 790B done
#1 transferring dockerfile: 790B done
#1 DONE 0.0s

#2 [internal] load metadata for docker.io/library/ubuntu:22.04
#2 ERROR: failed to copy: httpReadSeeker: failed open: unexpected status code https://registry-1.docker.io/v2/library/ubuntu/manifests/sha256:1d19c776e76cdb32dcc72cbd44a689c9be9518b9c4ed7f9a92b38f46176b931b: 429 Too Many Requests - Server message: toomanyrequests: You have reached your pull rate limit. You may increase the limit by authenticating and upgrading: https://www.docker.com/increase-rate-limit
 > [internal] load metadata for docker.io/library/ubuntu:22.04:
------
Dockerfile:1
--------------------
--------------------
   1 | >>> FROM ubuntu:22.04
   2 |     
   3 |     ARG DEBIAN_FRONTEND=noninteractive
--------------------
ERROR: failed to solve: ubuntu:22.04: failed to resolve source metadata for docker.io/library/ubuntu:22.04: failed to copy: httpReadSeeker: failed open: unexpected status code https://registry-1.docker.io/v2/library/ubuntu/manifests/sha256:1d19c776e76cdb32dcc72cbd44a689c9be9518b9c4ed7f9a92b38f46176b931b: 429 Too Many Requests - Server message: toomanyrequests: You have reached your pull rate limit. You may increase the limit by authenticating and upgrading: https://www.docker.com/increase-rate-limit
#0 building with "vigilant_volhard" instance using docker-container driver

#1 [internal] load build definition from Dockerfile
#1 transferring dockerfile: 790B done
#1 transferring dockerfile: 790B done
#1 DONE 0.0s

#2 [internal] load metadata for docker.io/library/ubuntu:22.04
#2 ERROR: failed to copy: httpReadSeeker: failed open: unexpected status code https://registry-1.docker.io/v2/library/ubuntu/manifests/sha256:1d19c776e76cdb32dcc72cbd44a689c9be9518b9c4ed7f9a92b38f46176b931b: 429 Too Many Requests - Server message: toomanyrequests: You have reached your pull rate limit. You may increase the limit by authenticating and upgrading: https://www.docker.com/increase-rate-limit
 > [internal] load metadata for docker.io/library/ubuntu:22.04:
------
Dockerfile:1
--------------------
--------------------
   1 | >>> FROM ubuntu:22.04
   2 |     
   3 |     ARG DEBIAN_FRONTEND=noninteractive
--------------------
ERROR: failed to solve: ubuntu:22.04: failed to resolve source metadata for docker.io/library/ubuntu:22.04: failed to copy: httpReadSeeker: failed open: unexpected status code https://registry-1.docker.io/v2/library/ubuntu/manifests/sha256:1d19c776e76cdb32dcc72cbd44a689c9be9518b9c4ed7f9a92b38f46176b931b: 429 Too Many Requests - Server message: toomanyrequests: You have reached your pull rate limit. You may increase the limit by authenticating and upgrading: https://www.docker.com/increase-rate-limit
#0 building with "vigilant_volhard" instance using docker-container driver

#1 [internal] load build definition from Dockerfile
#1 transferring dockerfile: 790B done
#1 transferring dockerfile: 790B done
#1 DONE 0.0s

#2 [internal] load metadata for docker.io/library/ubuntu:22.04
#2 ERROR: failed to copy: httpReadSeeker: failed open: unexpected status code https://registry-1.docker.io/v2/library/ubuntu/manifests/sha256:1d19c776e76cdb32dcc72cbd44a689c9be9518b9c4ed7f9a92b38f46176b931b: 429 Too Many Requests - Server message: toomanyrequests: You have reached your pull rate limit. You may increase the limit by authenticating and upgrading: https://www.docker.com/increase-rate-limit
 > [internal] load metadata for docker.io/library/ubuntu:22.04:
------
Dockerfile:1
--------------------
--------------------
   1 | >>> FROM ubuntu:22.04
   2 |     
   3 |     ARG DEBIAN_FRONTEND=noninteractive
--------------------
ERROR: failed to solve: ubuntu:22.04: failed to resolve source metadata for docker.io/library/ubuntu:22.04: failed to copy: httpReadSeeker: failed open: unexpected status code https://registry-1.docker.io/v2/library/ubuntu/manifests/sha256:1d19c776e76cdb32dcc72cbd44a689c9be9518b9c4ed7f9a92b38f46176b931b: 429 Too Many Requests - Server message: toomanyrequests: You have reached your pull rate limit. You may increase the limit by authenticating and upgrading: https://www.docker.com/increase-rate-limit
##[error]Process completed with exit code 1.
Post job cleanup.

@compiler-errors
Copy link
Member

@bors retry p=10

@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 Jul 2, 2024
@bors
Copy link
Contributor

bors commented Jul 2, 2024

⌛ Testing commit 6407580 with merge 6292b2a...

@bors
Copy link
Contributor

bors commented Jul 2, 2024

☀️ Test successful - checks-actions
Approved by: matthiaskrgr
Pushing 6292b2a to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jul 2, 2024
@bors bors merged commit 6292b2a into rust-lang:master Jul 2, 2024
7 checks passed
@rustbot rustbot added this to the 1.81.0 milestone Jul 2, 2024
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (6292b2a): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

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

Max RSS (memory usage)

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

Cycles

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

Binary size

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

Bootstrap: 695.727s -> 696.719s (0.14%)
Artifact size: 327.59 MiB -> 327.57 MiB (-0.01%)

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. O-unix Operating system: Unix-like O-windows Operating system: Windows 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. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver)
Projects
None yet
Development

Successfully merging this pull request may close these issues.