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 15 pull requests #122008

Closed
wants to merge 42 commits into from
Closed

Conversation

jhpratt
Copy link
Member

@jhpratt jhpratt commented Mar 5, 2024

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

Takashiidobe and others added 30 commits February 16, 2024 20:21
Copying is O(n)—not the memory allocation
With rust 1.75 the absolute build path is embedding into '.rustc' section and which causes reproducibility issues. Detailed issue is here.
rust-lang#120825 (comment)

With this change the 'absolute path' changed back to '/rust/$hash' format.
Unnamed union fields with enums are checked for, but if `find_field`
causes an ICE then the compiler won't get to that point.

Signed-off-by: David Wood <david@davidtw.co>
As this can cause panics on array accesses later.
Co-authored-by: Rémy Rakic <remy.rakic+github@gmail.com>
Co-authored-by: Simon Farnsworth <simon@farnz.org.uk>
Add basic i18n guidance for `Display`

I've tried to be relatively noncommittal here. The part I think is most important is to mention the concept of "display adapters" *somewhere* in the `std::fmt` documentation that has some chance of being discovered when people go looking for ways to provide context when `Display`ing their type.

Rendered:

> ### Internationalization
>
> Because a type can only have one `Display` implementation, it is often preferable to only implement `Display` when there is a single most "obvious" way that values can be formatted as text. This could mean formatting according to the "invariant" culture and "undefined" locale, or it could mean that the type display is designed for a specific culture/locale, such as developer logs.
>
> If not all values have a justifiably canonical textual format or if you want to support alternative formats not covered by the standard set of possible [formatting traits], the most flexible approach is display adapters: methods like [`str::escape_default`] or [`Path::display`] which create a wrapper implementing `Display` to output the specific display format.
>
> [formatting traits]: https://doc.rust-lang.org/nightly/std/fmt/index.html#formatting-traits
> [`str::escape_default`]: https://doc.rust-lang.org/nightly/std/primitive.str.html#method.escape_default
> [`Path::display`]: https://doc.rust-lang.org/nightly/std/path/struct.Path.html#method.display

The module docs do already have a [localization header](https://doc.rust-lang.org/nightly/std/fmt/index.html#localization), so maybe this header should be l10n instead of i18n, or maybe this information should live under that header? I'm not sure, but here on the `Display` trait at least isn't a *bad* spot to put it.

The other side of this that comes up a lot is `FromStr` compatibility, but that's for a different PR.
… r=pnkfelix

Limit the number of names and values in check-cfg diagnostics

The Rust for Linux [feedback](rust-lang#82450 (comment)) to the check-cfg Call for Testing, revealed a weakness in the check-cfg. They are unbounded and in the case RfL they have ~20k cfgs and having them printed (even once) is unbearable.

This PR limits it to 35 (28 rustc well known + `feature` + `docsrs` + 5 custom) which feels like a good middle ground for regular users (i.e. Cargo users).

When it goes over that limit print the N first with " and X more".

``@rustbot`` label +F-check-cfg
…c-into-inner, r=cuviper

Add an example to demonstrate how Rc::into_inner works

This PR adds an example to Rc::into_inner, since it didn't have one previously.
@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-libs Relevant to the library team, which will review and decide on the PR/issue. rollup A PR which is a rollup labels Mar 5, 2024
@jhpratt
Copy link
Member Author

jhpratt commented Mar 5, 2024

@bors r+ rollup=never p=15

@bors
Copy link
Contributor

bors commented Mar 5, 2024

📌 Commit 4a65a53 has been approved by jhpratt

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 Mar 5, 2024
@bors
Copy link
Contributor

bors commented Mar 5, 2024

⌛ Testing commit 4a65a53 with merge 76f9fb4...

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

Successful merges:

 - rust-lang#121065 (Add basic i18n guidance for `Display`)
 - rust-lang#121202 (Limit the number of names and values in check-cfg diagnostics)
 - rust-lang#121213 (Add an example to demonstrate how Rc::into_inner works)
 - rust-lang#121262 (Add vector time complexity)
 - rust-lang#121287 (Clarify/add `must_use` message for Rc/Arc/Weak::into_raw.)
 - rust-lang#121664 (Adjust error `yield`/`await` lowering)
 - rust-lang#121838 (Use the correct logic for nested impl trait in assoc types)
 - rust-lang#121860 (Add a tidy check that checks whether the fluent slugs only appear once)
 - rust-lang#121913 (Don't panic when waiting on poisoned queries)
 - rust-lang#121959 (Removing absolute path in proc-macro)
 - rust-lang#121975 (hir_analysis: enums return `None` in `find_field`)
 - rust-lang#121978 (Fix duplicated path in the "not found dylib" error)
 - rust-lang#121987 (pattern analysis: abort on arity mismatch)
 - rust-lang#121993 (Avoid using unnecessary queries when printing the query stack in panics)
 - rust-lang#121997 (interpret/cast: make more matches on FloatTy properly exhaustive)

r? `@ghost`
`@rustbot` modify labels: rollup
@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)

@bors
Copy link
Contributor

bors commented Mar 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 Mar 5, 2024
@jhpratt
Copy link
Member Author

jhpratt commented Mar 5, 2024

@bors retry

@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 Mar 5, 2024
@tgross35
Copy link
Contributor

tgross35 commented Mar 5, 2024

FYI #121262 could use a squash, last 4 commits are fixups

@jhpratt
Copy link
Member Author

jhpratt commented Mar 5, 2024

I can do a rollup without that PR if you'd prefer? I quickly looked at the overall diff, not the actual commits.

@tgross35
Copy link
Contributor

tgross35 commented Mar 5, 2024

I have no say, just happened to come across that one and notice the commits are redundant. About two hours until the current job finishes so no rush either way 🙂

@jhpratt
Copy link
Member Author

jhpratt commented Mar 5, 2024

I know it'll be a bit, which is why I asked. Personally I don't really care, but I'm also a new reviewer.

@tgross35
Copy link
Contributor

tgross35 commented Mar 5, 2024

I'm not a reviewer at all so also not sure what the process is. I guess it doesn't hurt to drop that one if you get the chance, a cleaner commit history is never a bad thing

@bors
Copy link
Contributor

bors commented Mar 5, 2024

🔒 Merge conflict

This pull request and the master branch diverged in a way that cannot be automatically merged. Please rebase on top of the latest master branch, and let the reviewer approve again.

How do I rebase?

Assuming self is your fork and upstream is this repository, you can resolve the conflict following these steps:

  1. git checkout rollup-g08ehpt (switch to your branch)
  2. git fetch upstream master (retrieve the latest master)
  3. git rebase upstream/master -p (rebase on top of it)
  4. Follow the on-screen instruction to resolve conflicts (check git status if you got lost).
  5. git push self rollup-g08ehpt --force-with-lease (update this PR)

You may also read Git Rebasing to Resolve Conflicts by Drew Blessing for a short tutorial.

Please avoid the "Resolve conflicts" button on GitHub. It uses git merge instead of git rebase which makes the PR commit history more difficult to read.

Sometimes step 4 will complete without asking for resolution. This is usually due to difference between how Cargo.lock conflict is handled during merge and rebase. This is normal, and you should still perform step 5 to update this PR.

Error message
Auto-merging compiler/rustc_session/src/session.rs
Auto-merging compiler/rustc_lint/src/context/diagnostics.rs
CONFLICT (content): Merge conflict in compiler/rustc_lint/src/context/diagnostics.rs
Automatic merge failed; fix conflicts and then commit the result.

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Mar 5, 2024
@tgross35
Copy link
Contributor

tgross35 commented Mar 5, 2024

Well, guess that's an answer 😆

@jhpratt jhpratt closed this Mar 5, 2024
@jhpratt jhpratt deleted the rollup-g08ehpt branch March 5, 2024 05:56
@jhpratt
Copy link
Member Author

jhpratt commented Mar 5, 2024

To be fair, the merge conflict isn't related to the the extraneous commits 😛

@bors
Copy link
Contributor

bors commented Mar 5, 2024

☔ The latest upstream changes (presumably #121780) made this pull request unmergeable. Please resolve the merge conflicts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) A-testsuite Area: The testsuite used to check the correctness of rustc rollup A PR which is a rollup S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. 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.