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 6 pull requests #89435

Merged
merged 15 commits into from
Oct 1, 2021
Merged

Rollup of 6 pull requests #89435

merged 15 commits into from
Oct 1, 2021

Conversation

Manishearth
Copy link
Member

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

notriddle and others added 15 commits September 16, 2021 15:06
Co-authored-by: Esteban Kuber <estebank@users.noreply.github.com>
Co-authored-by: Esteban Kuber <esteban@kuber.com.ar>
… there's other problems

As shown in the two test requirements that got updated, if there's other problems,
then those other problems are probably the root cause of the incorrect generics count.
Added -Z randomize-layout flag

An implementation of rust-lang#77316, it currently randomly shuffles the fields of `repr(rust)` types based on their `DefPathHash`
r? ``@eddyb``
…petrochenkov

Add `pie` as another `relocation-model` value

MCP: rust-lang/compiler-team#461
…estebank

feat(rustc_parse): recover from pre-RFC-2000 const generics syntax

Fixes rust-lang#89013
…haelwoerister

Reapply "Remove optimization_fuel_crate from Session"
…nkov

Improve error message for `printf`-style format strings

Fixes rust-lang#89173. The following is actually supported today:
```rust
fn main() {
    let num = 5;
    let width = 20;
    print!("%*2$x", num, width);
}
```
```
error: multiple unused formatting arguments
 --> src/main.rs:4:21
  |
4 |     print!("%*2$x", num, width);
  |            -------  ^^^  ^^^^^ argument never used
  |            ||       |
  |            ||       argument never used
  |            |help: format specifiers use curly braces: `{:1$x}`
  |            multiple missing formatting specifiers
  |
  = note: printf formatting not supported; see the documentation for `std::fmt`
```
However, as noted in rust-lang#89173, something like
```rust
    print!("%0*x", width, num);
```
does not give a helpful suggestion. I think this is partly intended, because there actually _is_ no Rust equivalent to this; you always have to use a positional or named argument to specify the width (instead of just using the "next" argument, as `printf` or even `.*` as a precision specifier in Rust would). Therefore, I have added a note:
```
[...]
note: format specifiers use curly braces, and you have to use a positional or named parameter for the width
 --> t2.rs:4:13
  |
4 |     print!("%0*x", width, num);
  |             ^^^^
  = note: printf formatting not supported; see the documentation for `std::fmt`
```
This is not perfect, but it should at least point the user in the right direction, instead of issuing no explanation at all.

cc ```@lcnr```
…_message, r=michaelwoerister

Correct caller/callsite confusion in inliner message

`callee_body` is the MIR `Body` for the `callsite.callee` so this message basically says `"Inline {bar span} into bar"` when it should say `"Inline bar into foo"`.

Extracted out of rust-lang#82280
@rustbot rustbot added the rollup A PR which is a rollup label Oct 1, 2021
@Manishearth
Copy link
Member Author

@bors r+

p=5

@bors
Copy link
Contributor

bors commented Oct 1, 2021

📌 Commit 534946c has been approved by Manishearth

@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 Oct 1, 2021
@fee1-dead
Copy link
Member

@bors p=5

looks like bors can't parse multiline arguments.

@bors
Copy link
Contributor

bors commented Oct 1, 2021

⌛ Testing commit 534946c with merge b6057bf...

@Manishearth
Copy link
Member Author

heh I knew that, unsure why I typed it that way

@bors
Copy link
Contributor

bors commented Oct 1, 2021

☀️ Test successful - checks-actions
Approved by: Manishearth
Pushing b6057bf to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Oct 1, 2021
@bors bors merged commit b6057bf into rust-lang:master Oct 1, 2021
@rustbot rustbot added this to the 1.57.0 milestone Oct 1, 2021
@bors bors mentioned this pull request Oct 1, 2021
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (b6057bf): comparison url.

Summary: This change led to moderate relevant regressions 😿 in compiler performance.

  • Moderate regression in instruction counts (up to 0.8% on incr-unchanged builds of externs)

If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf.

Next Steps: If you can justify the regressions found in this perf run, please indicate this with @rustbot label: +perf-regression-triaged along with sufficient written justification. If you cannot justify the regressions please open an issue or create a new PR that fixes the regressions, add a comment linking to the newly created issue or PR, and then add the perf-regression-triaged label to this PR.

@rustbot label: +perf-regression

@rustbot rustbot added the perf-regression Performance regression. label Oct 1, 2021
@Manishearth Manishearth deleted the rollup-vh2ih7k branch October 1, 2021 22:36
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. perf-regression Performance regression. 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.