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 11 pull requests #88568

Closed
wants to merge 33 commits into from

Conversation

GuillaumeGomez
Copy link
Member

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

ChrisDenton and others added 30 commits August 8, 2021 22:11
This updates the tests to be consistent with argv in modern C/C++ applications.
As derived from extensive testing of `argv` in a C/C++ application.

Co-Authored-By: Jane Lusby <jlusby42@gmail.com>
Co-authored-by: kennytm <kennytm@gmail.com>
Issue Details:
In some cases it is necessary to generate an "allocator shim" to forward various Rust allocation functions (e.g., `__rust_alloc`) to an underlying function (e.g., `malloc`). However, since this allocator shim is a manually created LLVM module it is not processed via the normal module processing code and so no debug info is generated for it (if debugging info is enabled).

Fix Details:
* Modify the `debuginfo` code to allow creating debug info for a module without a `CodegenCx` (since it is difficult, and expensive, to create one just to emit some debug info).
* After creating the allocator shim add in basic debug info.
Lint missing Abi in ast validation instead of lowering.
…-ou-se

Update Windows Argument Parsing

Fixes rust-lang#44650

The Windows command line is passed to applications [as a single string](https://docs.microsoft.com/en-us/archive/blogs/larryosterman/the-windows-command-line-is-just-a-string) which the application then parses to get a list of arguments. The standard rules (as used by C/C++) for parsing the command line have slightly changed over the years, most recently in 2008 which added new escaping rules.

This PR implements the new rules as [described on MSDN](https://docs.microsoft.com/en-us/cpp/cpp/main-function-command-line-args?view=msvc-160#parsing-c-command-line-arguments) and [further detailed here](https://daviddeley.com/autohotkey/parameters/parameters.htm#WIN). It has been tested against the behaviour of C++ by calling a C++ program that outputs its raw command line and the contents of `argv`. See [my repo](https://github.com/ChrisDenton/winarg/tree/std) if anyone wants to reproduce my work.

For an overview of how this PR changes argument parsing behavior and why we feel it is warranted see rust-lang#87580 (comment).

For some examples see: rust-lang#87580 (comment)
…lementors-display, r=camelid,Manishearth

Display associated types of implementors

Fixes rust-lang#86631.

Contrary to before, it doesn't display methods. I also had to "resurrect" the `auto-hide-trait-implementations` setting. :3

Only question at this point: should I move the `render_impl` boolean arguments into one struct? We're starting to have quite a lot of them...

cc `@cynecx`
r? `@camelid`
…=kennytm

Use `unwrap_unchecked` where possible
Shrink Session a bit

Remove a couple of unnecessary fields from `Session` and remove a `Lock<T>` for a field that is never mutated anyway.
…necessary, r=davidtwco

fix(rustc_lint): better detect when parens are necessary

Fixes rust-lang#88519
…o, r=estebank

Include debug info for the allocator shim

Issue Details:
In some cases it is necessary to generate an "allocator shim" to forward various Rust allocation functions (e.g., `__rust_alloc`) to an underlying function (e.g., `malloc`). However, since this allocator shim is a manually created LLVM module it is not processed via the normal module processing code and so no debug info is generated for it (if debugging info is enabled).

Fix Details:
* Modify the `debuginfo` code to allow creating debug info for a module without a `CodegenCx` (since it is difficult, and expensive, to create one just to emit some debug info).
* After creating the allocator shim add in basic debug info.
`fmt::Formatter::pad`: don't call chars().count() more than one time

First commit merges two branches of match to call chars().count() only once: that should be faster if this method hits place of 3rd (previous) branch, plus quarter shorter.
Second commit fixes some clippy lints while i'm here (should it be separate PR?).
Add regression test for issue 83190

Reduced from `bioyino-metric` by `@hellow554` and myself.

Closes rust-lang#83190.

r? `@spastorino`
@rustbot rustbot added the rollup A PR which is a rollup label Sep 1, 2021
@GuillaumeGomez
Copy link
Member Author

@bors: r+ p=11 rollup=never

@bors
Copy link
Contributor

bors commented Sep 1, 2021

📌 Commit f230145 has been approved by GuillaumeGomez

@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 Sep 1, 2021
@matthiaskrgr
Copy link
Member

@GuillaumeGomez #88530 looks like it is intended to be perf sensitive so maybe it should not be rolled up?

@GuillaumeGomez
Copy link
Member Author

I marked it as such. I'll close this PR and open a new one. Thanks @matthiaskrgr !

@GuillaumeGomez GuillaumeGomez deleted the rollup-2o5a1wq branch September 1, 2021 20:09
@camelid
Copy link
Member

camelid commented Sep 1, 2021

Just to make sure bors doesn't try to merge this: @bors r-

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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.