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

Merged
merged 39 commits into from
Nov 28, 2017
Merged

Rollup of 10 pull requests #46312

merged 39 commits into from
Nov 28, 2017

Conversation

ia0 and others added 30 commits October 25, 2017 00:06
Added note that specifies a semicolon should be removed after a given struct
Relates to rust-lang/rfcs#2140 - drain_filter for all collections

`drain_filter` is implemented instead of `LinkedList::remove_if` based
on review feedback.
In main.rs libc is imported as:

    #[cfg(unix)]
    extern crate libc;
MIR: adopt borrowck test

Fix trailing whitespace

span_bug! on unexpected action

Make RegionVid use newtype_index!

Closes rust-lang#45843

Check rvalue aggregates during check_stmt in tycheck, add initial, (not passing) test

Fix failing test

Remove attributes and test comments accidentally left behind, add in span_mirbugs

Normalize LvalueTy for ops and format code to satisfy tidy check

only normalize operand types when in an ADT constructor

avoid early return

handle the active field index in unions

normalize types in ADT constructor

Fixes rust-lang#45940

Fix borrowck compiler errors for upvars contain "spurious" dereferences

Fixes rust-lang#46003

added associated function Box::leak

Box::leak - improve documentation

Box::leak - fixed bug in documentation

Box::leak - relaxed constraints wrt. lifetimes

Box::leak - updated documentation

Box::leak - made an oops, fixed now =)

Box::leak: update unstable issue number (46179).

Add test for rust-lang#44953

Add missing Debug impls to std_unicode

Also adds #![deny(missing_debug_implementations)] so they don't get
missed again.

Amend RELEASES for 1.22.1

and fix the date for 1.22.0

Rename param in `[T]::swap_with_slice` from `src` to `other`.

The idea of ‘source’ and ‘destination’ aren’t very applicable for this
operation since both slices can both be considered sources and
destinations.

Clarify stdin behavior of `Command::output`.

Fixes rust-lang#44929.

Add hints for the case of confusing enum with its variants

Add failing testcases

Add module population and case of enum in place of expression

Use for_each_child_stable in find_module

Use multiline text for crate conflict diagnostics

Make float::from_bits transmute (and update the documentation to reflect this).

The current implementation/documentation was made to avoid sNaN because of
potential safety issues implied by old/bad LLVM documentation. These issues
aren't real, so we can just make the implementation transmute (as permitted
by the existing documentation of this method).

Also the documentation didn't actually match the behaviour: it said we may
change sNaNs, but in fact we canonicalized *all* NaNs.

Also an example in the documentation was wrong: it said we *always* change
sNaNs, when the documentation was explicitly written to indicate it was
implementation-defined.

This makes to_bits and from_bits perfectly roundtrip cross-platform, except
for one caveat: although the 2008 edition of IEEE-754 specifies how to
interpet the signaling bit, earlier editions didn't. This lead to some platforms
picking the opposite interpretation, so all signaling NaNs on x86/ARM are quiet
on MIPS, and vice-versa.

NaN-boxing is a fairly important optimization, while we don't even guarantee
that float operations properly preserve signalingness. As such, this seems like
the more natural strategy to take (as opposed to trying to mangle the signaling
bit on a per-platform basis).

This implementation is also, of course, faster.

Simplify an Iterator::fold to Iterator::any

This method of once-diagnostics doesn't allow nesting

UI tests extract the regular output from the 'rendered' field in json

Merge cfail and ui tests into ui tests

Add a MIR pass to lower 128-bit operators to lang item calls

Runs only with `-Z lower_128bit_ops` since it's not hooked into targets yet.

Include tuple projections in MIR tests

Add type checking for the lang item

As part of doing so, add more lang items instead of passing u128 to the i128 ones where it doesn't matter in twos-complement.

Handle shifts properly

* The overflow-checking shift items need to take a full 128-bit type, since they need to be able to detect idiocy like `1i128 << (1u128 << 127)`
* The unchecked ones just take u32, like the `*_sh?` methods in core
* Because shift-by-anything is allowed, cast into a new local for every shift

incr.comp.: Make sure we don't lose unused green results from the query cache.

rustbuild: Update LLVM and enable ThinLTO

This commit updates LLVM to fix rust-lang#45511 (https://reviews.llvm.org/D39981) and
also reenables ThinLTO for libtest now that we shouldn't hit rust-lang#45768. This also
opportunistically enables ThinLTO for libstd which was previously blocked
(rust-lang#45661) on test failures related to debuginfo with a presumed cause of rust-lang#45511.

Closes rust-lang#45511

std: Flag Windows TLS dtor symbol as #[used]

Turns out ThinLTO was internalizing this symbol and eliminating it. Worse yet if
you compiled with LTO turns out no TLS destructors would run on Windows! The
`#[used]` annotation should be a more bulletproof implementation (in the face of
LTO) of preserving this symbol all the way through in LLVM and ensuring it makes
it all the way to the linker which will take care of it.

Add enum InitializationRequiringAction

Fix tidy tests
…gers

Before stabilization I’d have suggested changing the behavior,
but that time is past.
…chton

Implement From<RecvError> for TryRecvError and RecvTimeoutError

According to the documentation, it looks to me that `TryRecvError` and `RecvTimeoutError` are strict extensions of `RecvError`. As such, it makes sense to allow conversion from the latter type to the two former types without constraining future developments.

This permits to write `input.recv()?` and `input.recv_timeout(timeout)?` in the same function for example.
…sfackler

Stabilize spin_loop_hint

Stabilize `spin_loop_hint` in release `1.23.0`.
I've also renamed feature `hint_core_should_pause` to `spin_loop_hint`.

cc rust-lang#41196
MIR: Fix value moved diagnose messages

rust-lang#45960. I believe this will take a different approach. Simply replacing all nouns to verbs (`desired_action`) messes up the message `use of moved value` (although fixes the message in original issue). Here is what happens:

<pre>
$ rustc -Zborrowck-mir src/test/ui/borrowck/borrowck-reinit.rs

error[E0382]: <b>used</b> of moved value: `x` (Mir)
  --> src/test/ui/borrowck/borrowck-reinit.rs:18:16
   |
17 |     drop(x);
   |          - value moved here
18 |     let _ = (1,x);
   |                ^ value used here after move

error: aborting due to 2 previous errors
</pre>
(Notice: *"**used** of moved value: `x`"* instead of *"**use**"*)

Which does not seem to be okay.

After experimenting a bit, it looks like [`report_use_of_moved_value()`](https://github.com/rust-lang/rust/blob/1dc0b573e7ce4314eb196b21b7e0ea4a1bf1f673/src/librustc_mir/borrow_check.rs#L1319) tries to handle both these messages by taking in only one form of`desired_action`.

These messages rise from: *"[{noun} of moved value](https://github.com/rust-lang/rust/blob/1dc0b573e7ce4314eb196b21b7e0ea4a1bf1f673/src/librustc_mir/borrow_check.rs#L1338-L1342)"* and *"[value {verb} here after move](https://github.com/rust-lang/rust/blob/1dc0b573e7ce4314eb196b21b7e0ea4a1bf1f673/src/librustc_mir/borrow_check.rs#L1343)"*.

This PR fixes *"value {verb} here after move"* type messages by passing a corresponding verb (`desired_action`) instead of the original noun.
…stebank

Expand docs of <$Int>::from_str_radix, based on that of char::to_digit
Suggest using slice when encountering `let x = ""[..];`

Fix rust-lang#26319.
Remove semicolon note

In reference to issue rust-lang#46186
r? @estebank

First time doing a pull request, if there are any suggestions on how to improve this please let me know.
@jjolly
…olnay

Introduce LinkedList::drain_filter

This introduces `LinkedList::remove_if`.

This operation embodies one of the use-cases where `LinkedList` would typically be preferred over `Vec`: random removal and retrieval.

There are a number of considerations with this:

Should there be two `remove_if` methods? One where elements are only removed, one which returns a collection of removed elements.

Should this be implemented using a draining iterator pattern that covers both cases? I suspect that would incur a bit of overhead (moving the element into the iterator, then into a new collection). But I'm not sure. Maybe that's an acceptable compromise to maximize flexibility.

I don't feel I've had enough exposure to unsafe programming in rust to be certain the implementation is correct. This relies quite heavily on moving around copies of Shared pointers to make the code reasonable. Please help me out :).
…mulacrum

Compiletest libc dependency can be unix-only

In main.rs libc is imported as:

```rust
#[cfg(unix)]
extern crate libc;
```

This came up in Manishearth/compiletest-rs#90.
…rielb1

Shorten output of E0391

Use the shorter `def_span` on the impl-Trait cyclic reference errors.
…aumeGomez

Document non-obvious behavior of fmt::UpperHex & co for negative integers

Before stabilization I’d have suggested changing the behavior,  but that time is past.
@rust-highfive
Copy link
Collaborator

r? @aidanhs

(rust_highfive has picked a reviewer for you, use r? to override)

@kennytm
Copy link
Member Author

kennytm commented Nov 27, 2017

@bors r+ p=10

@bors
Copy link
Contributor

bors commented Nov 27, 2017

📌 Commit 83a6f38 has been approved by kennytm

@kennytm kennytm added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Nov 27, 2017
@bors
Copy link
Contributor

bors commented Nov 27, 2017

⌛ Testing commit 83a6f38 with merge 84ec3522084df5564dc825bdb6b0cd297c69b6ec...

@bors
Copy link
Contributor

bors commented Nov 27, 2017

💔 Test failed - status-travis

@kennytm
Copy link
Member Author

kennytm commented Nov 27, 2017

@bors retry #43283

[01:20:47] test process::tests::test_process_output_fail_to_start has been running for over 60 seconds


No output has been received in the last 30m0s, this potentially indicates a stalled build or something wrong with the build itself.
Check the details on how to adjust your build configuration on: https://docs.travis-ci.com/user/common-build-problems/#Build-times-out-because-no-output-was-received

The build has been terminated

@bors
Copy link
Contributor

bors commented Nov 27, 2017

⌛ Testing commit 83a6f38 with merge b087a99...

bors added a commit that referenced this pull request Nov 27, 2017
Rollup of 10 pull requests

- Successful merges: #45506, #46174, #46231, #46240, #46249, #46258, #46262, #46275, #46282, #46285
- Failed merges:
@bors
Copy link
Contributor

bors commented Nov 28, 2017

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