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 #83199

Merged
merged 36 commits into from
Mar 16, 2021
Merged

Rollup of 10 pull requests #83199

merged 36 commits into from
Mar 16, 2021

Conversation

JohnTitor
Copy link
Member

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

Kixunil and others added 30 commits February 6, 2021 22:16
This method is similar to the existing `exists()` method, except it
doesn't silently ignore the errors, leading to less error-prone code.

This change intentionally does NOT touch the documentation of `exists()`
nor recommend people to use this method while it's unstable.
Such changes are reserved for stabilization to prevent confusing people.

Apart from that it avoids conflicts with rust-lang#80979.
There is no reason for this function to return an object,
since it is always used for getting at the name anyhow.
It's used in the inner loop for some popular functions,
so we want to avoid allocating in it.
Every time splice() is called, another temporary object is created.
This version, which uses plain objects as a sort of Hash Bag,
should only produce one temporary object each time it's called.
Basically, it doesn't make sense to generate those things every time
you search. That generates a bunch of stuff for the GC to clean up,
when, if the user wanted to do another search, it would just need
to re-do it again.
Co-authored-by: Guillaume Gomez <guillaume1.gomez@gmail.com>
This should have negligible effect on time, but it cuts about 1MiB
off of resident memory usage.
There's no reason for it to be a string, since it's only used for
de-duplicating the results arrays anyhow.
This basically fixes a search bug introduced by earlier changes.
Otherwise on systems where Arial is not available the system will
fallback to a serif font, rather than a sans-serif one.

This is especially relevant on acessibility-conscious setups (such as is
mine) that have web-fonts disabled and a limited set of fonts available
on the system.
This better matches the appearance of this kind of snippet in the full
item view and is less jarring to read due to repeated
foreground-background changes.
This prevents older git versions to change the "line endings".
83054 introduced validation of scalar range attributes, but panicking
code that uses the attribute remained reachable. Use `delay_span_bug`
instead to avoid the ICE.
…a checkout without other mods.

To be clear, by default running `x.py test` on a checkout of the beta branch
currently fails, and with this change will continue to fail, because `x.py
tests` runs `x.py test src/tools/tidy` which tries to run `rustfmt` and that
will fail because the `rustfmt` binary is pinned to the current nighlty and we
do not attempt to distribute one for the beta builds.

This change gives a better error message than the current message, which is just
"./x.py fmt is not supported on this channel" without providing any hint about
what one might do about that problem.

(update: placated tidy.)
This adds the ID of the tracking issue to the feature.
Added `try_exists()` method to `std::path::Path`

This method is similar to the existing `exists()` method, except it
doesn't silently ignore the errors, leading to less error-prone code.

This change intentionally does NOT touch the documentation of `exists()`
nor recommend people to use this method while it's unstable.
Such changes are reserved for stabilization to prevent confusing people.

Apart from that it avoids conflicts with rust-lang#80979.

`@joshtriplett` requested this PR in [internals discussion](https://internals.rust-lang.org/t/the-api-of-path-exists-encourages-broken-code/13817/25?u=kixunil)
Update `Vec` docs

Fix typos/nits in `Vec` docs
…, r=GuillaumeGomez

rustdoc: reduce GC work during search
Constify `copy` related functions

Constify

* `*const T::copy_to[_nonoverlapping]`
* `*mut T::copy_to[_nonoverlapping]`
* `*mut T::copy_from[_nonoverlapping]`
* `mem::transmute_copy`
* `mem::swap`
* `ptr::swap[_nonoverlapping]`
* `mem::replace`
* `ptr::replace`
…GuillaumeGomez

Fall-back to sans-serif if Arial is not available

Otherwise on systems where Arial is not available the UA will
fallback to a serif font, rather than a sans-serif one.

This is especially relevant on acessibility-conscious setups (such as is
mine) that have web-fonts disabled and a limited set of fonts available
on the system.

r? ```@GuillaumeGomez``` cc ```@jsha```
…d, r=GuillaumeGomez

No background for code in portability snippets

This better matches the appearance of this kind of snippet in the full
item view and is less jarring to read due to repeated
foreground-background changes.

![Listing of items in a module with some portability snippets attached to some of the items (light theme). The portability snippet has a light blue background and all of the text in it, monospace or not, is the same colour – black](https://user-images.githubusercontent.com/679122/111196363-1900f500-85b5-11eb-8f97-e283c59002a4.png)
![Listing of items in a module with some portability snippets attached to some of the items (dark theme). The portability snippet has a light blue background and all of the text in it, monospace or not, is the same colour – black](https://user-images.githubusercontent.com/679122/111196366-19998b80-85b5-11eb-9914-4d14d9d13ed3.png)

There should be no observable changes to the ayu theme.
…erives, r=petrochenkov

Deprecate RustcEncodable and RustcDecodable.

We can't remove the `RustcEncodable` and `RustcDecodable` derive macros from the prelude, but we can deprecate them.
Specify *.woff2 files as binary

This prevents older git versions to change the "line endings".
Fixes rust-lang#83159.
…do-about-tidy-on-beta, r=Mark-Simulacrum

More informative diagnotic from `x.py test` attempt atop beta checkout

Make bootstrap be more informative when one does `x.py test` on a beta checkout without other mods.

To be clear, by default running `x.py test` on a checkout of the beta branch
currently fails, and with this change will continue to fail, because `x.py
tests` runs `x.py test src/tools/tidy` which tries to run `rustfmt` and that
will fail because the `rustfmt` binary is pinned to the current nighlty and we
do not attempt to distribute one for the beta builds.

This change gives a better error message than the current message, which is just
"./x.py fmt is not supported on this channel" without providing any hint about
what one might do about that problem.
… r=oli-obk

Use delay_span_bug instead of panic in layout_scalar_valid_range

rust-lang#83054 introduced validation of scalar range attributes, but panicking
code that uses the attribute remained reachable. Use `delay_span_bug`
instead to avoid the ICE.

Fixes rust-lang#83180.
@rustbot rustbot added the rollup A PR which is a rollup label Mar 16, 2021
@JohnTitor
Copy link
Member Author

@bors r+ p=10 rollup=never

@bors
Copy link
Contributor

bors commented Mar 16, 2021

📌 Commit ec07427 has been approved by JohnTitor

@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 Mar 16, 2021
@bors
Copy link
Contributor

bors commented Mar 16, 2021

⌛ Testing commit ec07427 with merge 1d6754d...

@bors
Copy link
Contributor

bors commented Mar 16, 2021

☀️ Test successful - checks-actions
Approved by: JohnTitor
Pushing 1d6754d to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Mar 16, 2021
@bors bors merged commit 1d6754d into rust-lang:master Mar 16, 2021
@rustbot rustbot added this to the 1.52.0 milestone Mar 16, 2021
@JohnTitor JohnTitor deleted the rollup-zrfk94a branch March 16, 2021 19:21
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.