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 9 pull requests #100931

Closed
wants to merge 18 commits into from
Closed

Conversation

JohnTitor
Copy link
Member

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

artemmukhin and others added 18 commits June 29, 2022 17:39
High traffic macros should detail this helpful addition.
This makes it consistent with `x.py` as changed in rust-lang#95671

Fixes rust-lang#100459
...replacing `.cast().wrapping_offset().cast()` & similar code.
Rootless podman creates a separate user namespace, where an inner
`LOCAL_USER_ID` will map to a different subuid range on the host.
The "keep-id" mode maps the current UID directly into the container.

This makes `src/ci/docker/run.sh` work better for testing container
images on systems running podman, where "docker" is just a shim.
…sleywiser

Add GDB/LLDB pretty-printers for NonZero types

Add GDB/LLDB pretty-printers for `NonZero` types.
These pretty-printers were originally implemented for IntelliJ Rust by `@Kobzol` in intellij-rust/intellij-rust#5270.

Part of rust-lang#29392.
…riplett

Properly forward `ByRefSized::fold` to the inner iterator

cc `@timvermeulen,` who noticed this mistake in rust-lang#100214 (comment)
Fix wrong compiletest filters on Windows

As discussed in [rust-lang#79334](rust-lang#79334), when calling e.g.
```
python x.py test src/test/ui/expr/compound-assignment/eval-order.rs
```
on Windows, compiletest passes the filter `expr/compound-assignment/eval-order.rs` to libtest, which instead should be `expr\compound-assignment\eval-order.rs`, as that is the file found when collecting tests. This is what I fixed.

I'm not sure how to organize a test for this. Any suggestions?
… r=scottmcm

Make use of `[wrapping_]byte_{add,sub}`

These new methods trivially replace old `.cast().wrapping_offset().cast()` & similar code.
Note that [`arith_offset`](https://doc.rust-lang.org/std/intrinsics/fn.arith_offset.html) and `wrapping_offset` are the same thing.

r? `@scottmcm`

_split off from #100746_
…lacrum

Use `getuid` to check instead of `USER` env var in rustbuild

This makes it consistent with `x.py` as changed in rust-lang#95671

Fixes rust-lang#100459
Extra documentation for new formatting feature

Documentation of this feature was added in rust-lang#90473 and released in Rust 1.58. However, high traffic macros did not receive new examples. Namely `println!()` and `format!()`.

The doc comments included in Rust are super important to the community- especially newcomers. I have met several other newbies like myself who are unaware of this recent (well about 7 months old now) update to the language allowing for convenient intra-string identifiers.

Bringing small examples of this feature to the doc comments of `println!()` and `format!()` would be helpful to everyone learning the language.

[Blog Post Announcing Feature](https://blog.rust-lang.org/2022/01/13/Rust-1.58.0.html)
[Feature PR](rust-lang#90473) - includes several instances of documentation of the feature- minus the macros in question for this PR

*This is my first time contributing to a project this large. Feedback would mean the world to me 😄*

---

*Recreated; I violated the [No-Merge Policy](https://rustc-dev-guide.rust-lang.org/git.html#no-merge-policy)*
Diagnose missing includes in run-make tests
Use `--userns=keep-id` when "docker" is really podman

Rootless podman creates a separate user namespace, where an inner
`LOCAL_USER_ID` will map to a different subuid range on the host.
The "keep-id" mode maps the current UID directly into the container.

This makes `src/ci/docker/run.sh` work better for testing container
images on systems running podman, where "docker" is just a shim.
@rustbot rustbot added 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 Aug 23, 2022
@JohnTitor
Copy link
Member Author

@bors r+ p=9 rollup=never

@bors
Copy link
Contributor

bors commented Aug 23, 2022

📌 Commit 9ce0c3a has been approved by JohnTitor

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 Aug 23, 2022
@bors
Copy link
Contributor

bors commented Aug 24, 2022

⌛ Testing commit 9ce0c3a with merge e617d283e3c048d9278e584a5849d23b38e9de8e...

@bors
Copy link
Contributor

bors commented Aug 24, 2022

💔 Test failed - checks-actions

@bors bors removed the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Aug 24, 2022
@bors bors added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 24, 2022
@rust-log-analyzer
Copy link
Collaborator

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

Click to see the possible cause of the failure (guessed by this bot)
   Compiling walkdir v2.3.2
   Compiling ignore v0.4.18
   Compiling toml v0.5.9
   Compiling xz2 v0.1.6
error[E0425]: cannot find function `getuid` in crate `libc`
    |
    |
403 |                 let uid = unsafe { libc::getuid() };
    |                                          ^^^^^^ help: a function with a similar name exists: `getpid`
   ::: C:\Users\runneradmin\.cargo\registry\src\github.com-1ecc6299db9ec823\libc-0.2.126\src\windows\mod.rs:474:5
    |
474 |     pub fn getpid() -> ::c_int;
474 |     pub fn getpid() -> ::c_int;
    |     -------------------------- similarly named function `getpid` defined here
For more information about this error, try `rustc --explain E0425`.
error: could not compile `bootstrap` due to previous error
failed to run: D:\a\rust\rust\build\x86_64-pc-windows-msvc\stage0\bin\cargo.exe build --manifest-path D:\a\rust\rust\src/bootstrap/Cargo.toml --locked --features build-metrics
Build completed unsuccessfully in 0:01:34
Build completed unsuccessfully in 0:01:34
make: *** [Makefile:58: prepare] Error 1
Command failed. Attempt 2/5:
Building rustbuild
   Compiling bootstrap v0.0.0 (D:\a\rust\rust\src\bootstrap)
error[E0425]: cannot find function `getuid` in crate `libc`
    |
    |
403 |                 let uid = unsafe { libc::getuid() };
    |                                          ^^^^^^ help: a function with a similar name exists: `getpid`
   ::: C:\Users\runneradmin\.cargo\registry\src\github.com-1ecc6299db9ec823\libc-0.2.126\src\windows\mod.rs:474:5
    |
474 |     pub fn getpid() -> ::c_int;
474 |     pub fn getpid() -> ::c_int;
    |     -------------------------- similarly named function `getpid` defined here
For more information about this error, try `rustc --explain E0425`.
error: could not compile `bootstrap` due to previous error
failed to run: D:\a\rust\rust\build\x86_64-pc-windows-msvc\stage0\bin\cargo.exe build --manifest-path D:\a\rust\rust\src/bootstrap/Cargo.toml --locked --features build-metrics
Build completed unsuccessfully in 0:00:02
Build completed unsuccessfully in 0:00:02
make: *** [Makefile:58: prepare] Error 1
Command failed. Attempt 3/5:
Building rustbuild
   Compiling bootstrap v0.0.0 (D:\a\rust\rust\src\bootstrap)
error[E0425]: cannot find function `getuid` in crate `libc`
    |
    |
403 |                 let uid = unsafe { libc::getuid() };
    |                                          ^^^^^^ help: a function with a similar name exists: `getpid`
   ::: C:\Users\runneradmin\.cargo\registry\src\github.com-1ecc6299db9ec823\libc-0.2.126\src\windows\mod.rs:474:5
    |
474 |     pub fn getpid() -> ::c_int;
474 |     pub fn getpid() -> ::c_int;
    |     -------------------------- similarly named function `getpid` defined here
For more information about this error, try `rustc --explain E0425`.
error: could not compile `bootstrap` due to previous error
failed to run: D:\a\rust\rust\build\x86_64-pc-windows-msvc\stage0\bin\cargo.exe build --manifest-path D:\a\rust\rust\src/bootstrap/Cargo.toml --locked --features build-metrics
Build completed unsuccessfully in 0:00:02
Build completed unsuccessfully in 0:00:02
make: *** [Makefile:58: prepare] Error 1
Command failed. Attempt 4/5:
Building rustbuild
   Compiling bootstrap v0.0.0 (D:\a\rust\rust\src\bootstrap)
error[E0425]: cannot find function `getuid` in crate `libc`
    |
    |
403 |                 let uid = unsafe { libc::getuid() };
    |                                          ^^^^^^ help: a function with a similar name exists: `getpid`
   ::: C:\Users\runneradmin\.cargo\registry\src\github.com-1ecc6299db9ec823\libc-0.2.126\src\windows\mod.rs:474:5
    |
474 |     pub fn getpid() -> ::c_int;
474 |     pub fn getpid() -> ::c_int;
    |     -------------------------- similarly named function `getpid` defined here
For more information about this error, try `rustc --explain E0425`.
error: could not compile `bootstrap` due to previous error
failed to run: D:\a\rust\rust\build\x86_64-pc-windows-msvc\stage0\bin\cargo.exe build --manifest-path D:\a\rust\rust\src/bootstrap/Cargo.toml --locked --features build-metrics
Build completed unsuccessfully in 0:00:02
Build completed unsuccessfully in 0:00:02
make: *** [Makefile:58: prepare] Error 1
Command failed. Attempt 5/5:
Building rustbuild
   Compiling bootstrap v0.0.0 (D:\a\rust\rust\src\bootstrap)
error[E0425]: cannot find function `getuid` in crate `libc`
    |
    |
403 |                 let uid = unsafe { libc::getuid() };
    |                                          ^^^^^^ help: a function with a similar name exists: `getpid`
   ::: C:\Users\runneradmin\.cargo\registry\src\github.com-1ecc6299db9ec823\libc-0.2.126\src\windows\mod.rs:474:5
    |
474 |     pub fn getpid() -> ::c_int;
474 |     pub fn getpid() -> ::c_int;
    |     -------------------------- similarly named function `getpid` defined here
For more information about this error, try `rustc --explain E0425`.
error: could not compile `bootstrap` due to previous error
failed to run: D:\a\rust\rust\build\x86_64-pc-windows-msvc\stage0\bin\cargo.exe build --manifest-path D:\a\rust\rust\src/bootstrap/Cargo.toml --locked --features build-metrics
Build completed unsuccessfully in 0:00:02

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

None yet