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

Merged
merged 39 commits into from
Jan 28, 2017
Merged

Rollup of 21 pull requests #39353

merged 39 commits into from
Jan 28, 2017

Conversation

estebank and others added 20 commits January 3, 2017 10:05
```rust
let vr = v.iter().filter(|x| {
    x % 2 == 0
});
```

will now yield the following compiler output:

```bash
ERROR binary operation `%` cannot be applied to type `&&_`
NOTE this is a reference of a reference to a type that `%` can be applied to,
you need to dereference this variable once for this operation to work
NOTE an implementation of `std::ops::Rem` might be missing for `&&_`
```

The first NOTE is new.

Bug rust-lang#33877
… deref.

drive-by: fix merge conflict; fix test expected error output post rebase.
This commit adds a new tool, `build-manifest`, which is used to generate a
distribution manifest of all produced artifacts. This tool is intended to
replace the `build-rust-manifest.py` script that's currently located on the
buildmaster. The intention is that we'll have a builder which periodically:

* Downloads all artifacts for a commit
* Runs `./x.py dist hash-and-sign`. This will generate `sha256` and `asc` files
  as well as TOML manifests.
* Upload all generated hashes and manifests to the directory the artifacts came
  from.
* Upload *all* artifacts (tarballs and hashes and manifests) to an archived
  location.
* If necessary, upload all artifacts to the main location.

This script is intended to just be the second step here where orchestrating
uploads and such will all happen externally from the build system itself.
Previously we only uploaded tarballs, but this modifies Travis/AppVeyor to
upload everything. We shouldn't have anything else in there to worry about and
otherwise we need to be sure to pick up pkg/msi/exe installers.
This commit applies the stabilization/deprecations of the 1.16.0 release, as
tracked by the rust-lang/rust issue tracker and the final-comment-period tag.

The following APIs were stabilized:

* `VecDeque::truncate`
* `VecDeque::resize`
* `String::insert_str`
* `Duration::checked_{add,sub,div,mul}`
* `str::replacen`
* `SocketAddr::is_ipv{4,6}`
* `IpAddr::is_ipv{4,6}`
* `str::repeat`
* `Vec::dedup_by`
* `Vec::dedup_by_key`
* `Result::unwrap_or_default`
* `<*const T>::wrapping_offset`
* `<*mut T>::wrapping_offset`
* `CommandExt::creation_flags` (on Windows)
* `File::set_permissions`
* `String::split_off`

The following APIs were deprecated

* `EnumSet` - replaced with other ecosystem abstractions, long since unstable

Closes rust-lang#27788
Closes rust-lang#35553
Closes rust-lang#35774
Closes rust-lang#36436
Closes rust-lang#36949
Closes rust-lang#37079
Closes rust-lang#37087
Closes rust-lang#37516
Closes rust-lang#37827
Closes rust-lang#37916
Closes rust-lang#37966
Closes rust-lang#38080
For every method, the first sentence should consisely explain what it does,
not how. This sentence usually starts with a verb.

It's really weird for `sort` to be explained in terms of another function,
namely `sort_by`. There's no need for that because it's obvious how `sort`
sorts elements: there is `T: Ord`.

If `sort_by_key` does not have to explicitly state how it's implemented,
then `sort` doesn't either.
Fixes an ICE when running with save-analsysis after an error
This comes up when using `-Zunstable-options --unpretty=mir`.
Previously, rustc would ICE due to an unwrap later in this function
(after `as_local_node_id`). Instead, we should just ignore items from
other crates when pretty-printing MIR.
Apparently LLVMArbitraryPrecisionInteger demands integers to be in low-endian 64-bytes, rather than
host-endian 64-bytes. This is weird, and obviously, not documented. Also, fixed now. And rustc now
works a teeny bit more on big endians.
The previous ways didn't work; this does.

cc rust-lang-nursery/thanks#45
Previously we tested whether a handful of preprocessor variables indicating certain 64 bit
platforms, but this does not work for other 64 bit targets which have support for __int128 in C
compiler.

Use the __SIZEOF__INT128__ preprocessor variable instead. This variable gets set to 16 by gcc and
clang for every target where __int128 is supported.
@rust-highfive
Copy link
Collaborator

r? @nrc

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

@alexcrichton
Copy link
Member Author

@bors: r+ p=5

@bors
Copy link
Contributor

bors commented Jan 27, 2017

📌 Commit 100ab90 has been approved by alexcrichton

@bors
Copy link
Contributor

bors commented Jan 28, 2017

🔒 Merge conflict

Detect double reference when applying binary op

``` rust
let vr = v.iter().filter(|x| {
    x % 2 == 0
});
```

will now yield the following compiler output:

``` bash
ERROR binary operation `%` cannot be applied to type `&&_`
NOTE this is a reference of a reference to a type that `%` can be applied to,
you need to dereference this variable once for this operation to work
NOTE an implementation of `std::ops::Rem` might be missing for `&&_`
```

The first NOTE is new.

Fix rust-lang#33877

----

Thanks to @estebank for providing the original PR rust-lang#34420 (of which this is a tweaked rebase).
Add note for E0117

Fixes rust-lang#39249.

I just applied the suggestion of @durka since I don't see anything else to add.
std: Stabilize APIs for the 1.16.0 release

This commit applies the stabilization/deprecations of the 1.16.0 release, as
tracked by the rust-lang/rust issue tracker and the final-comment-period tag.

The following APIs were stabilized:

* `VecDeque::truncate`
* `VecDeque::resize`
* `String::insert_str`
* `Duration::checked_{add,sub,div,mul}`
* `str::replacen`
* `SocketAddr::is_ipv{4,6}`
* `IpAddr::is_ipv{4,6}`
* `str::repeat`
* `Vec::dedup_by`
* `Vec::dedup_by_key`
* `Result::unwrap_or_default`
* `<*const T>::wrapping_offset`
* `<*mut T>::wrapping_offset`
* `CommandExt::creation_flags` (on Windows)
* `File::set_permissions`
* `String::split_off`

The following APIs were deprecated

* `EnumSet` - replaced with other ecosystem abstractions, long since unstable

Closes rust-lang#27788
Closes rust-lang#35553
Closes rust-lang#35774
Closes rust-lang#36436
Closes rust-lang#36949
Closes rust-lang#37079
Closes rust-lang#37087
Closes rust-lang#37516
Closes rust-lang#37827
Closes rust-lang#37916
Closes rust-lang#37966
Closes rust-lang#38080
…r=eddyb

Avoid ICE when pretty-printing non-local MIR item.

This comes up when using `-Zunstable-options --unpretty=mir`. Previously, rustc would ICE due to an unwrap later in this function (after `as_local_node_id`). Instead, we should just ignore items from other crates when pretty-printing MIR.

This was reported in #rust: [this playground code](https://is.gd/PSMBZS) causes an ICE if you click the MIR button. The problem is the mention of the non-local item `std::usize::MAX`, so you can reduce the test case [a lot](https://is.gd/SaLjaa).

r? @eddyb
…illaumeGomez

drop_in_place is stable now, don't #![feature] it in the nomicon and a test.

It was stable since Rust 1.8.

r? @GuillaumeGomez
Rewrite the first sentence in slice::sort

For every method, the first sentence should consisely explain what it does,
not how. This sentence usually starts with a verb.

It's really weird for `sort` to be explained in terms of another function,
namely `sort_by`. There's no need for that because it's obvious how `sort`
sorts elements: there is `T: Ord`.

If `sort_by_key` does not have to explicitly state how it's implemented,
then `sort` doesn't either.

r? @steveklabnik
Fix another endianness issue in i128 trans

Apparently LLVMArbitraryPrecisionInteger demands integers to be in low-endian 64-bytes, rather than host-endian 64-bytes. This is weird, and obviously, not documented. And rustc now works a teeny bit more on big endians.

r? @eddyb
…x, r=petrochenkov

Fix can_begin_expr keyword behavior

Partial fix for rust-lang#28784.
…richton

Fix up @carols10cents' mailmap entry

The previous ways didn't work; this does.

cc rust-lang-nursery/thanks#45
…, r=alexcrichton

Use __SIZEOF_INT128__ to test __int128 presence

Previously we tested whether a handful of preprocessor variables indicating certain 64 bit
platforms, but this does not work for other 64 bit targets which have support for __int128 in C
compiler.

Use the `__SIZEOF__INT128__` preprocessor variable instead. This variable gets set to 16 by gcc and
clang for every target where __int128 is supported.
…1, r=eddyb

move `cast_kinds` into `TypeckTables` where it belongs

r? @eddyb
@alexcrichton
Copy link
Member Author

@bors: r+

@bors
Copy link
Contributor

bors commented Jan 28, 2017

📌 Commit 89e519d has been approved by alexcrichton

@bors
Copy link
Contributor

bors commented Jan 28, 2017

⌛ Testing commit 89e519d with merge 7cc0c00...

@bors
Copy link
Contributor

bors commented Jan 28, 2017

💔 Test failed - status-appveyor

@alexcrichton
Copy link
Member Author

@bors: r+

@bors
Copy link
Contributor

bors commented Jan 28, 2017

📌 Commit 1767d97 has been approved by alexcrichton

@bors
Copy link
Contributor

bors commented Jan 28, 2017

⌛ Testing commit 1767d97 with merge 0f8a296...

bors added a commit that referenced this pull request Jan 28, 2017
@bors
Copy link
Contributor

bors commented Jan 28, 2017

☀️ Test successful - status-appveyor, status-travis
Approved by: alexcrichton
Pushing 0f8a296 to master...

@bors bors merged commit 1767d97 into rust-lang:master Jan 28, 2017
@alexcrichton alexcrichton deleted the rollup branch February 11, 2017 18:38
@Centril Centril added the rollup A PR which is a rollup label Oct 2, 2019
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.