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 10 pull requests #82263

Merged
merged 30 commits into from
Feb 18, 2021
Merged

Rollup of 10 pull requests #82263

merged 30 commits into from
Feb 18, 2021

Conversation

Dylan-DPC-zz
Copy link

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

matthewjasper and others added 30 commits February 13, 2021 19:29
Also make sure that type arguments of associated types are printed in
some error messages.
Co-authored-by: Guillaume Gomez <guillaume1.gomez@gmail.com>
Co-authored-by: Guillaume Gomez <guillaume1.gomez@gmail.com>
Co-authored-by: Guillaume Gomez <guillaume1.gomez@gmail.com>
… r=Mark-Simulacrum

[libtest] Run the test synchronously when hitting thread limit

libtest currently panics if it hits the thread limit. This often results in spurious test failures (<code>thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 11, kind: WouldBlock, message: "Resource temporarily unavailable" }'</code> ... `error: test failed, to rerun pass '--lib'`). This PR makes it continue to run the test synchronously if it runs out of threads.

Closes rust-lang#78165.

``@rustbot`` label: A-libtest T-libs
…h726

Ensure valid TraitRefs are created for GATs

This fixes `ProjectionTy::trait_ref` to use the correct substs. Places that need all of the substs have been updated to not use `trait_ref`.

r? ````@jackh726````
const_generics: Dont evaluate array length const when handling yet another error

Same ICE as rust-lang#82009 except triggered by a different error.
cc ``@lcnr``
r? ``@varkor``
…n, r=petrochenkov

In some limited cases, suggest `where` bounds for non-type params

Partially address rust-lang#81971.
…=varkor

Replace if-let and while-let with `if let` and `while let`

This pull request replaces if-let and while-let with `if let` and `while let`.

closes rust-lang#82205
Make sure pdbs are copied along with exe and dlls when bootstrapping

This makes it easier to find the pdbs when wanting to debug the compiler on Windows.
avoid converting types into themselves (clippy::useless_conversion)
…549, r=GuillaumeGomez

Add long explanation for E0549

Helps with rust-lang#61137
…rkor

Optimize counting digits in line numbers during error reporting

Replaces `.to_string().len()` with simple loop and integer division, which avoids an unnecessary allocation.

Although I couldn't figure out how to directly profile `rustc`'s error reporting, I ran a microbenchmark on my machine (2.9 GHz Dual-Core Intel Core i5) on the two strategies for `0..100_000`, and the results seem promising:
```
test to_string_len ... bench:  12,124,792 ns/iter (+/- 700,652)
test while_loop    ... bench:      30,333 ns/iter (+/- 562)
```
The x86_64 disassembly reduces integer division to a multiplication + shift, so I don't think there's any problems with using integer division.

For more (micro)optimization, it would be nice if we could avoid the initial check to see if the line number is nonzero, but I don't think `self.get_max_line_num(span, children)` _guarantees_ a nonzero line number.
Print -Ztime-passes (and misc stats/logs) on stderr, not stdout.

I've tried not to change anything that looked similar to `rustc --print`, where people might use automation, and/or any "bulk" prints, such as dumping an entire Graphviz (`dot`) graph on stdout.

The reason I want `-Ztime-passes` to be on stderr like debug logging is I can get a complete (and correctly interleaved) view just by looking at stderr, which is merely a convenience when running `rustc`/Cargo directly, but even more important when it's nested in a build script, as Cargo will split the build script output into stdout (named `output`) and `stderr`.
@rustbot rustbot added the rollup A PR which is a rollup label Feb 18, 2021
@Dylan-DPC-zz
Copy link
Author

@bors r+ rollup=never p=5

@bors
Copy link
Contributor

bors commented Feb 18, 2021

📌 Commit efdcb43 has been approved by Dylan-DPC

@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 Feb 18, 2021
@bors
Copy link
Contributor

bors commented Feb 18, 2021

⌛ Testing commit efdcb43 with merge 0148b97...

@bors
Copy link
Contributor

bors commented Feb 18, 2021

☀️ Test successful - checks-actions
Approved by: Dylan-DPC
Pushing 0148b97 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Feb 18, 2021
@bors bors merged commit 0148b97 into rust-lang:master Feb 18, 2021
@rustbot rustbot added this to the 1.52.0 milestone Feb 18, 2021
@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)
  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at 0148b971c Auto merge of #82263 - Dylan-DPC:rollup-cypm2uw, r=Dylan-DPC
##[group]Run src/ci/publish_toolstate.sh
src/ci/publish_toolstate.sh
env:
  SCCACHE_BUCKET: rust-lang-ci-sccache2
  DEPLOY_BUCKET: rust-lang-ci2
  TOOLSTATE_REPO: https://github.com/rust-lang-nursery/rust-toolstate
---
  CACHE_DOMAIN: ci-caches.rust-lang.org
  TOOLSTATE_REPO_ACCESS_TOKEN: ***
##[endgroup]
Cloning into 'rust-toolstate'...
/home/runner/work/rust/rust/src/tools/publish_toolstate.py:121: DeprecationWarning: 'U' mode is deprecated
📣 Toolstate changed by rust-lang/rust#82263!
  with open(path, 'rU') as f:

Tested on commit rust-lang/rust@0148b971c921a0831fbf3357e5936eec724e3566.
Direct link to PR: <https://github.com/rust-lang/rust/pull/82263>

💔 miri on windows: test-fail → build-fail (cc @RalfJung @oli-obk @eddyb).
💔 miri on linux: test-fail → build-fail (cc @RalfJung @oli-obk @eddyb).
Traceback (most recent call last):
Traceback (most recent call last):
  File "/home/runner/work/rust/rust/src/tools/publish_toolstate.py", line 338, in <module>
    response = urllib2.urlopen(urllib2.Request(
  File "/usr/lib/python3.8/urllib/request.py", line 222, in urlopen
    return opener.open(url, data, timeout)
  File "/usr/lib/python3.8/urllib/request.py", line 522, in open
    req = meth(req)
  File "/usr/lib/python3.8/urllib/request.py", line 1281, in do_request_
    raise TypeError(msg)
TypeError: POST data should be bytes, an iterable of bytes, or a file object. It cannot be of type str.
##[error]Process completed with exit code 1.

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

Successfully merging this pull request may close these issues.

None yet