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 7 pull requests #97246

Merged
merged 18 commits into from
May 21, 2022
Merged

Rollup of 7 pull requests #97246

merged 18 commits into from
May 21, 2022

Conversation

GuillaumeGomez
Copy link
Member

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

SylvainDe and others added 18 commits May 19, 2022 22:01
The documentation mentions "FromStr’s from_str method is often used implicitly,
through str’s parse method. See parse’s documentation for examples.".

It may be nicer to show that in the code example as well.
Add or-pattern syntax in argument position
Use unicode identifiers and a unicode emoji in weird-exprs.rs
Add implicit call to from_str via parse in documentation

The documentation mentions "FromStr’s from_str method is often used implicitly,
through str’s parse method. See parse’s documentation for examples.".

It may be nicer to show that in the code example as well.
…riddle

Add eslint checks

The first check is to ensure that `=>` is always surrounded with whitespaces.

The second is to ensure that the dict objects looks like this: `{"a": 2}` and not `{"a" : 2}` or `{"a":2}`.

r? ``@notriddle``
make ptr::invalid not the same as a regular int2ptr cast

In Miri, we would like to distinguish `ptr::invalid` from `ptr::from_exposed_provenance`, so that we can provide better diagnostics issues like rust-lang/miri#2134, and so that we can detect the UB in programs like
```rust
fn main() {
    let x = 0u8;
    let original_ptr = &x as *const u8;
    let addr = original_ptr.expose_addr();
    let new_ptr: *const u8 = core::ptr::invalid(addr);
    unsafe {
        dbg!(*new_ptr);
    }
}
```

To achieve that, the two functions need to have different implementations. Currently, both are just `as` casts. We *could* add an intrinsic for this, but it turns out `transmute` already has the right behavior, at least as far as Miri is concerned. So I propose we just use that.

Cc `@Gankra`
Remove quadratic behaviour from -Zunpretty=hir-tree.

Closes rust-lang#97115
Add some more weird-exprs

Continuing from rust-lang#86713 (which stalled due to a thinking emoji), I'd like to "improve" the `weird-exprs.rs`-file (as I can't reopen that PR).
Bump LLVM fetched from CI to fix run-make

cc `@yaahc,` who found this while testing locally

Ideally we'd detect this in CI and catch it, but at least we have a comment now which should hopefully prevent this from happening in the future.

r? `@pietroalbini` or `@jyn514`
@rustbot rustbot added 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. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. rollup A PR which is a rollup labels May 21, 2022
@GuillaumeGomez
Copy link
Member Author

@bors r+ rollup=never p=7

@bors
Copy link
Contributor

bors commented May 21, 2022

📌 Commit 28730ac 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 May 21, 2022
@bors
Copy link
Contributor

bors commented May 21, 2022

⌛ Testing commit 28730ac with merge 3b9cf89...

@bors
Copy link
Contributor

bors commented May 21, 2022

☀️ Test successful - checks-actions
Approved by: GuillaumeGomez
Pushing 3b9cf89 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label May 21, 2022
@bors bors merged commit 3b9cf89 into rust-lang:master May 21, 2022
@rustbot rustbot added this to the 1.63.0 milestone May 21, 2022
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (3b9cf89): comparison url.

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results
  • Primary benchmarks: 😿 relevant regressions found
  • Secondary benchmarks: mixed results
Regressions 😿
(primary)
Regressions 😿
(secondary)
Improvements 🎉
(primary)
Improvements 🎉
(secondary)
All 😿 🎉
(primary)
count1 3 5 0 2 3
mean2 2.2% 1.7% N/A -1.9% 2.2%
max 2.7% 2.6% N/A -2.3% 2.7%

Cycles

Results
  • Primary benchmarks: 🎉 relevant improvement found
  • Secondary benchmarks: no relevant changes found
Regressions 😿
(primary)
Regressions 😿
(secondary)
Improvements 🎉
(primary)
Improvements 🎉
(secondary)
All 😿 🎉
(primary)
count1 0 0 1 0 1
mean2 N/A N/A -3.0% N/A -3.0%
max N/A N/A -3.0% N/A -3.0%

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

@rustbot label: -perf-regression

Footnotes

  1. number of relevant changes 2

  2. the arithmetic mean of the percent change 2

@GuillaumeGomez GuillaumeGomez deleted the rollup-btcok8x branch May 22, 2022 18:46
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. 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-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. 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.

10 participants