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 21 pull requests #55382

Merged
merged 62 commits into from
Oct 26, 2018
Merged

Rollup of 21 pull requests #55382

merged 62 commits into from
Oct 26, 2018

Conversation

kennytm
Copy link
Member

@kennytm kennytm commented Oct 26, 2018

Successful merges:

oli-obk and others added 30 commits October 4, 2018 17:07
The old test was supposed to check for proper html escaping when showing the
contents of constants. This was changed as part of rust-lang#53409. The revised test
asserts that the contents of the constant is not shown as part of the generated
documentation.
"Run" links to the playground are not added to the generated documentation if
the unstable `--playground-url` argument is not passed to rustdoc. Therefore,
without specifying `--playground-url` as a compile-flag, the test doesn't
correctly assert that `#![doc(html_playground_url = "")]` removes playground
links.
The `@!has` command does not support specifying just a PATH and an XPATH. That
means that the previous test searched for the literal string
`//h2[@id="implementations"]` within the generated output, which obviously
didn't exist. Even after adding a trait implementation, the test still passed.
The correct way to check for the existence of a DOM element with the id
`implementations` is to use the `@count` keyword.
Struct names are no longer encapsulated in `<code>` tags, which meant that the
test was not correctly verifying that it wasn't being show. I've also added a
check to make sure the documentation page for the redirect::Qux struct is not
generated at all.
The Auto Trait Implementation section is not wrapped in a
`synthetic-implementations` class. In fact, it is wrapped in a
`synthetic-implementations` id. However, we can generalize and completely remove
the `synthetic-implementations` requirement. We just have to verify that there's
no mention of "Auto Trait Implementations" anywhere.
The generated code would look like `<code>impl <a href="...">Foo</a></code>`
which the plain text matcher doesn't match. But by using the XPATH notation, the
nodes are flattened and we can correctly assert that `impl Foo` does not occur
in the generated docs.
The link that is matched against is not the same as would be generated by
rustdoc. We should also check that the `foo/private` directory is not generated
at all.
The function is called `fn_def_with_doc`, not `fn_def_with`.
If root is not START_BLOCK, `basic_blocks().len() - visited` does not represent
their exact size.
`compute_missing_ctors` is called a lot. It produces a vector, which can
be reasonably large (e.g. 100+ elements), but the vector is almost
always only checked for emptiness.

This commit changes `compute_missing_ctors` so it can be called in a
cheap way that just indicates if the vector would be empty. If
necessary, the function can subsequently be called in an expensive way
to compute the full vector.

This change reduces instruction counts for several benchmarks up to 2%.
Fixes rust-lang#55001, rust-lang#54744

Previously, SelectionContext would unconditionally cache the selection
result for an obligation. This worked fine for most users of
SelectionContext, but it caused an issue when used by Rustdoc's blanket
impl finder.

The issue occured when SelectionContext chose a ParamCandidate which
contained inference variables. Since inference variables can change
between calls to select(), it's not safe to cache the selection result -
the chosen candidate might not be applicable for future results, leading
to an ICE when we try to run confirmation.

This commit prevents SelectionContext from caching any ParamCandidate
that contains inference variables. This should always be completely
safe, as trait selection should never depend on a particular result
being cached.

I've also added some extra debug!() statements, which I found helpful in
tracking down this bug.
We're gonna link to nightly as this didn't make it into the corresponding stable.
Fallback to the release number as we can't get the
git commit sha as we're not in a git repository.

Fixes rust-lang#55341

Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
Co-Authored-By: steveklabnik <steve@steveklabnik.com>
This commit reduces the size of `Statement` from 80 bytes to 56 bytes on
64-bit platforms, by boxing the `AscribeUserType` variant of
`StatementKind`.

This change reduces instruction counts on most benchmarks by 1--3%.
Extend the impl_stable_hash_for! macro for miri.

Fixes rust-lang#54075.
…rewsxcv

Fix link to macros chapter

We're gonna link to nightly as this didn't make it into the corresponding stable.

r? @Mark-Simulacrum @Centril
…alexcrichton

rustbuild: fix remap-debuginfo when building a release

Fallback to the release number as we can't get the git commit sha as we're not in a git repository.

Fixes rust-lang#55341
…=nagisa

Shrink `Statement`.

This commit reduces the size of `Statement` from 80 bytes to 56 bytes on
64-bit platforms, by boxing the `AscribeUserType` variant of
`StatementKind`.

This change reduces instruction counts on most benchmarks by 1--3%.
…-typo-fixes, r=alexcrichton

Typo fixes in configure_cmake comments

Signed-off-by: Eddy Petrișor <eddy.petrisor@gmail.com>
…enkov

rustbuild: use configured linker to build boostrap

Currently, bootstrap uses it to compile everything, but x.py wasn't using it yet to build bootstrap itself.
This fixes the build for systems where the linker isn't called `cc`.
validity: assert that unions are non-empty
…simulacrum

Compile the libstd we distribute with -Ccodegen-unit=1

This PR
 - adds the `single-codegen-unit-std` option to `config.toml` which allows for setting the CGU count for `libstd` and `libtest` independently of the one for the rest of the compiler, and
 - sets the new option to `true` for all dist jobs in CI.

Fixes rust-lang#54872.
…, r=davidtwco

Use `SmallVec` for the queue in `coerce_unsized`.

This reduces the number of allocations done for the `tuple-stress`
benchmark by 4%.
…li-obk

bootstrap: clean up a few clippy findings

remove useless format!()s
remove redundant field names in a few struct initializations
pass slice instead of a vector to a function
use is_empty() instead of comparisons to .len()

No functional change intended.
@kennytm kennytm changed the title Rollup of 19 pull requests Rollup of 21 pull requests Oct 26, 2018
@kennytm
Copy link
Member Author

kennytm commented Oct 26, 2018

@bors r+

Removed #55262 (causing failure above)
Added #55264, #55383, #55391.

@bors
Copy link
Contributor

bors commented Oct 26, 2018

📌 Commit eb29530 has been approved by kennytm

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 26, 2018
@bors
Copy link
Contributor

bors commented Oct 26, 2018

⌛ Testing commit eb29530 with merge 3e6f30e...

bors added a commit that referenced this pull request Oct 26, 2018
Rollup of 21 pull requests

Successful merges:

 - #54816 (Don't try to promote already promoted out temporaries)
 - #54824 (Cleanup rustdoc tests with `@!has` and `@!matches`)
 - #54921 (Add line numbers option to rustdoc)
 - #55167 (Add a "cheap" mode for `compute_missing_ctors`.)
 - #55258 (Fix Rustdoc ICE when checking blanket impls)
 - #55264 (Compile the libstd we distribute with -Ccodegen-unit=1)
 - #55271 (Unimplement ExactSizeIterator for MIR traversing iterators)
 - #55292 (Macro diagnostics tweaks)
 - #55298 (Point at macro definition when no rules expect token)
 - #55301 (List allowed tokens after macro fragments)
 - #55302 (Extend the impl_stable_hash_for! macro for miri.)
 - #55325 (Fix link to macros chapter)
 - #55343 (rustbuild: fix remap-debuginfo when building a release)
 - #55346 (Shrink `Statement`.)
 - #55358 (Remove redundant clone (2))
 - #55370 (Update mailmap for estebank)
 - #55375 (Typo fixes in configure_cmake comments)
 - #55378 (rustbuild: use configured linker to build boostrap)
 - #55379 (validity: assert that unions are non-empty)
 - #55383 (Use `SmallVec` for the queue in `coerce_unsized`.)
 - #55391 (bootstrap: clean up a few clippy findings)
@bors
Copy link
Contributor

bors commented Oct 26, 2018

☀️ Test successful - status-appveyor, status-travis
Approved by: kennytm
Pushing 3e6f30e to master...

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.