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 19 pull requests #56381

Merged
merged 55 commits into from
Nov 30, 2018
Merged

Rollup of 19 pull requests #56381

merged 55 commits into from
Nov 30, 2018

Conversation

kennytm
Copy link
Member

@kennytm kennytm commented Nov 30, 2018

Successful merges:

nnethercote and others added 30 commits November 20, 2018 20:55
This requires adding a new method, `P::filter_map`.

This commit reduces instruction counts for various benchmarks by up to
0.7%.
`TryFrom<&[T]> for &[T; $N]` (note *reference* to an array) already exists,
but not needing to dereference makes type inference easier
for example when using `u32::from_be_bytes`.

Also add doc examples doing just that.
This commit converts some 2-space indents to 4-space indents.
They are unused. The commit also adds some blank lines between some
methods.
`Printer::word` takes a `&str` and converts it into a `String`, which
causes an allocation. But that allocation is rarely necessary, because
`&str` is almost always a `&'static str` or a `String` that won't be
used again.

This commit changes `Token::String` so it holds a `Cow<'static, str>`
instead of a `String`, which avoids a lot of allocations.
`pretty_print` takes a `Token` and `match`es on it. But the particular
`Token` kind is known at each call site, so this commit splits it into
five functions: `pretty_print_eof`, `pretty_print_begin`, etc.

This commit also does likewise with `print`, though there is one
callsite for `print` where the `Token` kind isn't known, so a generic
`print` has to stay (but it now just calls out to the various `print_*`
functions).
`mir_stats` has not been used since 2b32cb9.
This commit modifies linker flavor inference to only remove the extension
to the linker when performing inference if that extension is a 'exe'.
`make_solution` does not return any guidance for now
It stop asserts and panics from libstd to automatically
include string output and formatting code.

Use case: developing static executables smaller than 50 kilobytes,
where usual formatting code is excessive while keeping debuggability
in debug mode.

May resolve rust-lang#54981.
I noticed on a [recent build][1] that the linkchecker stage of CI took a
whopping 15 minutes of CI time for something that should be near
instantaneous. Some local profiling showed some very hot functions and
clones which were pretty easy to remove, and now instead of running in
minutes locally it runs in seconds.

[1]: https://ci.appveyor.com/project/rust-lang/rust/build/job/kptifw1kb1nm4xuu
Don't panic in determining the privacy of a type if a lifetime outlives
generic exists in an existential type.
…imulacrum

Update books

This pulls in @gankro 's final nomicon changes, and adds the edition guide as a submodule.

This is the final doc backport to beta for 1.31, as well.
… r=Centril

Stabilize self_struct_ctor feature.

[**Tracking Issue**](rust-lang#51994)
@kennytm kennytm changed the title Rollup of 17 pull requests Rollup of 15 pull requests Nov 30, 2018
@kennytm
Copy link
Member Author

kennytm commented Nov 30, 2018

@bors r+

Removed #56305, #56224. The Cargo.lock file is messed up.

@bors
Copy link
Contributor

bors commented Nov 30, 2018

📌 Commit 440bda4 has been approved by kennytm

…chton

Add libstd Cargo feature "panic_immediate_abort"

It stop asserts and panics from libstd to automatically
include string output and formatting code.

Use case: developing static executables smaller than 50 kilobytes,
where usual formatting code is excessive while keeping debuggability
in debug mode.

May resolve rust-lang#54981.
Fix const_fn ICE with non-const function pointer

Fixes rust-lang#56164
Implement chalk unification routines

`ResolventOps` and `AggregateOps` are mostly straightforwardly translated from chalk. I had caught a few bugs already in my `chalk` branch and backported fixes to this branch, but there may be other ones left. EDIT: I hope there are none left now :)

Fixes rust-lang#54935.
@kennytm kennytm changed the title Rollup of 15 pull requests Rollup of 19 pull requests Nov 30, 2018
@kennytm
Copy link
Member Author

kennytm commented Nov 30, 2018

@bors r+

Added #55011, #56324, #56337, #56214.

@bors
Copy link
Contributor

bors commented Nov 30, 2018

📌 Commit a6c4771 has been approved by kennytm

@bors
Copy link
Contributor

bors commented Nov 30, 2018

⌛ Testing commit a6c4771 with merge d09466c...

bors added a commit that referenced this pull request Nov 30, 2018
Rollup of 19 pull requests

Successful merges:

 - #55011 (Add libstd Cargo feature "panic_immediate_abort")
 - #55821 (Use sort_by_cached_key when the key function is not trivial/free)
 - #56014 (add test for issue #21335)
 - #56131 (Assorted tweaks)
 - #56214 (Implement chalk unification routines)
 - #56216 (Add TryFrom<&[T]> for [T; $N] where T: Copy)
 - #56268 (Reuse the `P` in `InvocationCollector::fold_{,opt_}expr`.)
 - #56324 (Use raw_entry for more efficient interning)
 - #56336 (Clean up and streamline the pretty-printer)
 - #56337 (Fix const_fn ICE with non-const function pointer)
 - #56339 (Remove not used option)
 - #56341 (Rename conversion util; remove duplicate util in librustc_codegen_llvm.)
 - #56349 (rustc 1.30.0's linker flavor inference is a non-backwards compat change to -Clinker)
 - #56355 (Add inline attributes and add unit to CommonTypes)
 - #56360 (Optimize local linkchecker program)
 - #56364 (Fix panic with outlives in existential type)
 - #56365 (Stabilize self_struct_ctor feature.)
 - #56367 (Moved some feature gate tests to correct location)
 - #56373 (Update books)
@bors
Copy link
Contributor

bors commented Nov 30, 2018

☀️ Test successful - status-appveyor, status-travis
Approved by: kennytm
Pushing d09466c 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.

None yet