- #58507 (Add a -Z time option which prints only passes which runs once)
- #58919 (Suggest using anonymous lifetime in `impl Trait` return)
- #59041 (fixes rust-lang#56766)
- #59586 (Fixed URL in cargotest::TEST_REPOS)
- #59595 (Update rustc-guide submodule)
- #59601 (Fix small typo)
- #59603 (stabilize ptr::hash)
bors [Sun, 31 Mar 2019 23:50:46 +0000 (23:50 +0000)]
Auto merge of #59507 - nnethercote:indent-with-SPACES, r=petrochenkov
Optimize indentation in the pretty printer.
Currently the pretty-printer calls `write!` for every space of
indentation. On some workloads the indentation level can exceed 100, and
a faster implementation reduces instruction counts by up to 7% on a few
workloads.
Currently the pretty-printer calls `write!` for every space of
indentation. On some workloads the indentation level can exceed 100, and
a faster implementation reduces instruction counts by up to 7% on a few
workloads.
bors [Sun, 31 Mar 2019 20:28:00 +0000 (20:28 +0000)]
Auto merge of #59577 - dlrobertson:fix_58881, r=nagisa
Fix LLVM IR generated for C-variadic arguments
It is possible to create malformed LLVM IR given variadic arguments that
are aggregate types. This occurs due to improper tracking of the current
argument in the functions list of arguments.
Dan Robertson [Wed, 27 Mar 2019 13:00:37 +0000 (13:00 +0000)]
Fix LLVM IR generated for C-variadic arguments
It is possible to create malformed LLVM IR given variadic arguments that
are aggregate types. This occurs due to improper tracking of the current
argument in the functions list of arguments.
Rollup merge of #59581 - jmcomets:stabilize-refcell_replace_swap, r=Centril
Stabilize refcell_replace_swap feature
Please be kind, this is my first time contributing. :smile:
I noticed #43570 only needs stabilizing (and I need it for a side project I'm working on), so I followed the [guide](https://rust-lang.github.io/rustc-guide/stabilization_guide.html#stabilization-pr) to move things forward.
Rollup merge of #59519 - eddyb:layout-variants-refactor, r=oli-obk
rustc_target: factor out common fields of non-Single Variants.
@tmandry and I were discussing ways to generalize the current variants/discriminant layout to allow more fields in the "`enum`" (or another multi-variant types, such as potentially generator state, in the future), shared by all variants, than just the tag/niche discriminant.
This refactor should make it easier to extend multi-variant layouts, as nothing is duplicating anymore between "tagged enums" and "niche-filling enums".
Esteban Küber [Sun, 31 Mar 2019 16:07:56 +0000 (09:07 -0700)]
Suggest using anonymous lifetime in `impl Trait` return without hacks
Fallback to `static_impl_trait` for nice error message by peeking at the
return type and the lifetime type. Point at the return type instead of
the return expr/stmt in NLL mode.
bors [Sat, 30 Mar 2019 22:15:05 +0000 (22:15 +0000)]
Auto merge of #59575 - Centril:rollup, r=Centril
Rollup of 3 pull requests
Successful merges:
- #59405 (doc: use correct body font URLs)
- #59562 (Changed reference style in dbg macro docs.)
- #59569 (Add book.toml with title to unstable-book doc)
Rollup merge of #59405 - benesch:docs-font, r=GuillaumeGomez
doc: use correct body font URLs
The CSS for the docs homepage (docs.rust-lang.org) was using the wrong
URL for the body font, resulting in the fallback serif font being used,
instead of the desired Source Serif Pro fonts.
(It's worth noting that the CSS for rustdoc's API generation got these URLs right.)
bors [Sat, 30 Mar 2019 14:12:12 +0000 (14:12 +0000)]
Auto merge of #59561 - Centril:rollup, r=Centril
Rollup of 5 pull requests
Successful merges:
- #59343 (rustc(codegen): uncache `def_symbol_name` prefix from `symbol_name`.)
- #59380 (Fix invalid DWARF for enums when using ThinLTO)
- #59463 (skip dyn keyword lint under macros)
- #59539 (Fix infinite recursion)
- #59544 (manifest: only include miri on the nightly channel)
Rollup merge of #59544 - cuviper:miri-nightly, r=Centril
manifest: only include miri on the nightly channel
miri needs to build std with xargo, which doesn't allow stable/beta:
<https://github.com/japaric/xargo/pull/204#issuecomment-374888868>
Therefore, at this time there's no point in making miri available on any
but the nightly channel. If we get a stable way to build `std`, like
[RFC 2663], then we can re-evaluate whether to start including miri,
perhaps still as `miri-preview`.
Rollup merge of #59463 - pnkfelix:issue-56327-skip-dyn-keyword-lint-under-macros, r=matthewjasper
skip dyn keyword lint under macros
This PR is following my own intuition that `rustfix` should never inject bugs into working code (even if that comes at the expense of it failing to fix things that will become bugs).
Rollup merge of #59380 - philipc:thinlto-variant, r=michaelwoerister
Fix invalid DWARF for enums when using ThinLTO
We were setting the same identifier for both the DW_TAG_structure_type
and the DW_TAG_variant_part. This becomes a problem when using ThinLTO
becauses it uses the identifier as a key for a map of types that is used
to delete duplicates based on the ODR, so one of them is deleted as a
duplicate, resulting in invalid DWARF.
The DW_TAG_variant_part isn't a standalone type, so it doesn't need
an identifier. Fix by omitting its identifier.
Rollup merge of #59343 - eddyb:rm-def-symbol-name, r=michaelwoerister
rustc(codegen): uncache `def_symbol_name` prefix from `symbol_name`.
The `def_symbol_name` query was an optimization to avoid recomputing the common part of a symbol name, as only the hash needs to be added to it for each symbol.
However, #57967 will add a new mangling scheme, which doesn't readily support this kind of reuse - while it's plausible, it requires a lot more effort, since you'd have to "symbolically evaluate" mangling, and keep it in a form where the backreference positions can be computed correctly in the final step.
So I want to see how much time we're actually saving with this `def_symbol_name` optimization, nowadays.
bors [Sat, 30 Mar 2019 08:32:13 +0000 (08:32 +0000)]
Auto merge of #59550 - Centril:rollup, r=Centril
Rollup of 10 pull requests
Successful merges:
- #59376 (RFC 2008: Enum Variants)
- #59453 (Recover from parse error in tuple syntax)
- #59455 (Account for short-hand field syntax when suggesting borrow)
- #59499 (Fix broken download link in the armhf-gnu image)
- #59512 (implement `AsRawFd` for stdio locks)
- #59525 (Whitelist some rustc attrs)
- #59528 (Improve the dbg! macro docs )
- #59532 (In doc examples, don't ignore read/write results)
- #59534 (rustdoc: collapse blanket impls in the same way as normal impls)
- #59537 (Fix OnceWith docstring.)