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 12 pull requests #100947

Closed
wants to merge 26 commits into from

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

scottmcm and others added 26 commits August 14, 2022 22:55
High traffic macros should detail this helpful addition.
… indexing

The error can be quite confusing to newcomers.
...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.
According to [blame], this rule was added to support enum struct
variants. However, enum struct variants don't use tables in their design
any more, so this rule does nothing.

[blame]: https://github.com/rust-lang/rust/blame/87991d5f5d72d6baca490141cb890211ba2f3843/src/librustdoc/html/static/css/rustdoc.css#L748
…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_
…with_positional_arg, r=TaKO8Ki

sugg: take into count the debug formatting

Closes rust-lang#100648

This PR will fix a suggestion error by taking into consideration also the `:?` symbol and act in a different way

`@rustbot` r? `@compiler-errors`

N.B: I did not find a full way to test the change, any idea?
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)*
…avidtwco

Suggest alternatives when trying to mutate a `HashMap`/`BTreeMap` via indexing

The error can be quite confusing to newcomers.

Fixes rust-lang#100873.

I'm not so sure about the message, open to wording suggestions.
Diagnose missing includes in run-make tests
…, r=notriddle

Rewrite error index generator to greatly reduce the size of the pages

Fixes rust-lang#100736.

Instead of having all error codes in a same page (making the DOM way too big), I split the output into multiple files and generated a list of links (if there is an explanation) to the error codes' explanation into the already existing file.

I also used this opportunity to greatly simplify the code. Instead of needing a `build.rs`, I simply imported the file we want and wrote the macro which generates a function containing everything we need. We just need to call it to get the error codes and their explanation (if any). Also, considering the implementations between markdown and HTML formats differed even further, the `Formatter` trait was becoming too problematic so I removed it too.

You can test it [here](https://rustdoc.crud.net/imperio/rewrite-error-index/error-index.html).

cc `@jsha`
r? `@notriddle`
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.
…r=sanxiyn

rustdoc: remove unused CSS rule

According to [blame], this rule was added to support enum struct variants. However, enum struct variants don't use tables in their design any more, so this rule does nothing.

[blame]: https://github.com/rust-lang/rust/blame/87991d5f5d72d6baca490141cb890211ba2f3843/src/librustdoc/html/static/css/rustdoc.css#L748
…impl-generic-mismatch, r=Dylan-DPC

Add a missing test case for impl generic mismatch

This suggestion use different span depending on whether the method has generics or not, so I added a test case about the method with some generics.
@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. labels Aug 24, 2022
@rustbot rustbot added T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. rollup A PR which is a rollup labels Aug 24, 2022
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=12

@bors
Copy link
Contributor

bors commented Aug 24, 2022

📌 Commit 62ae1fa has been approved by matthiaskrgr

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

bors commented Aug 24, 2022

⌛ Testing commit 62ae1fa with merge 2cdc5baca81e34ae0868f9aa5437da5552895787...

@bors
Copy link
Contributor

bors commented Aug 24, 2022

💥 Test timed out

@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 Aug 24, 2022
@matthiaskrgr
Copy link
Member Author

@bors retry timeout

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

bors commented Aug 24, 2022

⌛ Testing commit 62ae1fa with merge 1f0aed84e44198f1810ea5db6431e78a7c174bfe...

@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

Hmm, it might be that there is a miri test that somehow gets stuck (its always the x86 and msvcs tool builders that are hanging) but I didn't see and clear indication which test it might be :/

@matthiaskrgr
Copy link
Member Author

Kind of leaning towards #100811 or #100819 but only because everything else seems less likely to me :/

@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)

@RalfJung
Copy link
Member

RalfJung commented Aug 31, 2022

Hmm, it might be that there is a miri test that somehow gets stuck (its always the x86 and msvcs tool builders that are hanging) but I didn't see and clear indication which test it might be :/

Would be good to ping @rust-lang/miri in such situations. I just spent 15min tracking down a strange Miri hang, until narrowing it down to #101152.

@RalfJung
Copy link
Member

Actually turns out this was a real bug that our test suite missed but the Miri test suite caught -- see #101235.

@matthiaskrgr matthiaskrgr deleted the rollup-gyo7e6u branch October 9, 2022 00:31
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-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-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. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.