]> git.lizzy.rs Git - rust.git/log
rust.git
5 years agoAuto merge of #60435 - Centril:rollup-aa5lmuw, r=Centril
bors [Wed, 1 May 2019 17:24:11 +0000 (17:24 +0000)]
Auto merge of #60435 - Centril:rollup-aa5lmuw, r=Centril

Rollup of 7 pull requests

Successful merges:

 - #60287 (Use references for variances_of)
 - #60327 (Search for incompatible universes in borrow errors)
 - #60330 (Suggest using an inclusive range instead of an exclusive range when the endpoint overflows by 1)
 - #60366 (build-gcc: Create missing cc symlink)
 - #60369 (Support ZSTs in DispatchFromDyn)
 - #60404 (Implement `BorrowMut<str>` for `String`)
 - #60417 (Rename hir::ExprKind::Use to ::DropTemps and improve docs.)

Failed merges:

r? @ghost

5 years agoAuto merge of #60137 - eddyb:rustdoc-rm-def-ctor-hax, r=petrochenkov
bors [Wed, 1 May 2019 12:21:04 +0000 (12:21 +0000)]
Auto merge of #60137 - eddyb:rustdoc-rm-def-ctor-hax, r=petrochenkov

rustdoc: remove def_ctor hack.

~~No longer necessary since we have `describe_def`.~~

Turns out `def_ctor` was used in conjunction with abusing `tcx.type_of(def_id)` working on both type definitions and `impl`s (specifically, of builtin types), but also reimplementing a lot of the logic that `Clean` already provides on `Ty` / `ty::TraitRef`.

The first commit now does the minimal refactor to keep it working, while the second commit contains the rest of the refactor I started (parts of which I'm not sure we need to keep).

5 years agoAuto merge of #60195 - varkor:commontypes-to-common, r=eddyb
bors [Wed, 1 May 2019 09:32:58 +0000 (09:32 +0000)]
Auto merge of #60195 - varkor:commontypes-to-common, r=eddyb

Split `CommonTypes` into `CommonTypes` and `CommonLifetimes`

The so-called "`CommonTypes`" contains more than just types.

r? @eddyb

5 years agoRollup merge of #60417 - Centril:hir-exprkind-use-renamed-to-drop-temps, r=oli-obk
Mazdak Farrokhzad [Wed, 1 May 2019 06:29:16 +0000 (08:29 +0200)]
Rollup merge of #60417 - Centril:hir-exprkind-use-renamed-to-drop-temps, r=oli-obk

Rename hir::ExprKind::Use to ::DropTemps and improve docs.

Addresses https://github.com/rust-lang/rust/pull/60225#discussion_r279797691.

r? @oli-obk

cc @eddyb @Manishearth

5 years agoRollup merge of #60404 - lo48576:borrow-mut-for-string, r=sfackler
Mazdak Farrokhzad [Wed, 1 May 2019 06:29:15 +0000 (08:29 +0200)]
Rollup merge of #60404 - lo48576:borrow-mut-for-string, r=sfackler

Implement `BorrowMut<str>` for `String`

Closes rust-lang/rfcs#1282.

5 years agoRollup merge of #60369 - TimDiekmann:dispatch-zst, r=eddyb
Mazdak Farrokhzad [Wed, 1 May 2019 06:29:14 +0000 (08:29 +0200)]
Rollup merge of #60369 - TimDiekmann:dispatch-zst, r=eddyb

Support ZSTs in DispatchFromDyn

Allows to use ZSTs with 1 byte alignment in `DispatchFromDyn` implementation. This is required for `Box<T, A: Alloc>`

cc #58457

5 years agoRollup merge of #60366 - lzutao:patch-1, r=pietroalbini
Mazdak Farrokhzad [Wed, 1 May 2019 06:29:12 +0000 (08:29 +0200)]
Rollup merge of #60366 - lzutao:patch-1, r=pietroalbini

build-gcc: Create missing cc symlink

This PR mostly fixes build error caused by using rustc docker images
to build [rustup][1] (with the error: ``linker `cc` not found``).

I don't know why gcc build script doesn't install cc hard link by default.
In build log, with `make SHELL='sh -x' install`, gcc build script installs c++
hard link but not `cc` one:

```bash
if test "" != "yes" ; then \
  rm -f /rustroot/bin/g++; \
  /usr/bin/install -c xg++ /rustroot/bin/g++; \
  chmod a+x /rustroot/bin/g++; \
  rm -f /rustroot/bin/c++; \
  ( cd /rustroot/bin && \
    ln g++ c++ ); \
  if [ -f cc1plus ] ; then \
    if [ ! -f g++-cross ] ; then \
      rm -f /rustroot/bin/x86_64-unknown-linux-gnu-g++; \
      ( cd /rustroot/bin && \
        ln g++ x86_64-unknown-linux-gnu-g++ ); \
      rm -f /rustroot/bin/x86_64-unknown-linux-gnu-c++; \
      ( cd /rustroot/bin && \
        ln c++ x86_64-unknown-linux-gnu-c++ ); \
    fi ; \
  fi; \
fi
```

This might be fixed downstream by manually creating cc hard link
or setting `RUSTFLAGS="-C linker=gcc"` as [suggested by @mati865][2].
But I find it better to fix it upstream in this PR.

[1]: https://github.com/rust-lang/rustup.rs/pull/1815
[2]: https://github.com/rust-lang/rustup.rs/pull/1815#discussion_r279192797

5 years agoRollup merge of #60330 - varkor:range-endpoint-overflow-lint, r=estebank
Mazdak Farrokhzad [Wed, 1 May 2019 06:29:11 +0000 (08:29 +0200)]
Rollup merge of #60330 - varkor:range-endpoint-overflow-lint, r=estebank

Suggest using an inclusive range instead of an exclusive range when the endpoint overflows by 1

Fixes https://github.com/rust-lang/rust/issues/47213.

5 years agoRollup merge of #60327 - matthewjasper:handle-local-outlives-lbl, r=nikomatsakis
Mazdak Farrokhzad [Wed, 1 May 2019 06:29:10 +0000 (08:29 +0200)]
Rollup merge of #60327 - matthewjasper:handle-local-outlives-lbl, r=nikomatsakis

Search for incompatible universes in borrow errors

If we have a borrow that has to live for `'static` we need to check for
any regions in incompatible universes when trying to find the cause.

closes #60274

5 years agoRollup merge of #60287 - Zoxc:the-arena-variances_of, r=eddyb
Mazdak Farrokhzad [Wed, 1 May 2019 06:29:09 +0000 (08:29 +0200)]
Rollup merge of #60287 - Zoxc:the-arena-variances_of, r=eddyb

Use references for variances_of

Based on https://github.com/rust-lang/rust/pull/60280.

cc @varkor
r? @eddyb

5 years agoAuto merge of #60280 - varkor:const-param-invariance, r=eddyb
bors [Wed, 1 May 2019 03:06:13 +0000 (03:06 +0000)]
Auto merge of #60280 - varkor:const-param-invariance, r=eddyb

Fix indexing issue for const parameter invariance

We were previously not taking account of the parent parameters.

r? @eddyb
cc @Zoxc

5 years agoRename is_range_literal to is_lit
varkor [Tue, 30 Apr 2019 23:08:01 +0000 (00:08 +0100)]
Rename is_range_literal to is_lit

5 years agoAuto merge of #60204 - jethrogb:jb/rtunwrap-debug-print, r=alexcrichton
bors [Tue, 30 Apr 2019 22:46:28 +0000 (22:46 +0000)]
Auto merge of #60204 - jethrogb:jb/rtunwrap-debug-print, r=alexcrichton

Debug-print error when using rtunwrap

When I added this macro a while back I didn't have a way to make it print the failure for all types that you might want to unwrap. Now, I came up with a solution.

5 years agoPull out some functors for readability
varkor [Tue, 30 Apr 2019 22:37:38 +0000 (23:37 +0100)]
Pull out some functors for readability

5 years agoRefactor is_range_literal
varkor [Tue, 30 Apr 2019 22:17:58 +0000 (23:17 +0100)]
Refactor is_range_literal

5 years agoInclude signed integer types in the lint
varkor [Sat, 27 Apr 2019 12:52:42 +0000 (13:52 +0100)]
Include signed integer types in the lint

5 years agoPreserve literal suffixes
varkor [Sat, 27 Apr 2019 12:26:06 +0000 (13:26 +0100)]
Preserve literal suffixes

5 years agoPlace types inside backticks
varkor [Sat, 27 Apr 2019 11:56:57 +0000 (12:56 +0100)]
Place types inside backticks

5 years agoAdd a test for overflowing endpoints
varkor [Sat, 27 Apr 2019 11:45:17 +0000 (12:45 +0100)]
Add a test for overflowing endpoints

5 years agoSuggest using an inclusive range for an overflowing endpoint
varkor [Sat, 27 Apr 2019 11:44:51 +0000 (12:44 +0100)]
Suggest using an inclusive range for an overflowing endpoint

5 years agoPull `is_range_literal` out into `lowering`
varkor [Sat, 27 Apr 2019 11:44:32 +0000 (12:44 +0100)]
Pull `is_range_literal` out into `lowering`

5 years agoAuto merge of #60262 - michaelwoerister:pgo-preinlining-pass, r=alexcrichton
bors [Tue, 30 Apr 2019 19:52:13 +0000 (19:52 +0000)]
Auto merge of #60262 - michaelwoerister:pgo-preinlining-pass, r=alexcrichton

 PGO: Add a run-make test that makes sure that PGO profiling data is used by the compiler during optimizations.

From the tests comment section:
```
# This test makes sure that PGO profiling data leads to cold functions being
# marked as `cold` and hot functions with `inlinehint`.
# The test program contains an `if` were actual execution only ever takes the
# `else` branch. Accordingly, we expect the function that is never called to
# be marked as cold.
```

r? @alexcrichton

5 years agoRename hir::ExprKind::Use to ::DropTemps and improve docs.
Mazdak Farrokhzad [Tue, 30 Apr 2019 15:46:59 +0000 (17:46 +0200)]
Rename hir::ExprKind::Use to ::DropTemps and improve docs.

5 years agoWork around missing tac command on macOS in PGO run-make test.
Michael Woerister [Tue, 30 Apr 2019 15:38:01 +0000 (17:38 +0200)]
Work around missing tac command on macOS in PGO run-make test.

5 years agoAuto merge of #60416 - Centril:rollup-bbyyz9x, r=Centril
bors [Tue, 30 Apr 2019 15:19:40 +0000 (15:19 +0000)]
Auto merge of #60416 - Centril:rollup-bbyyz9x, r=Centril

Rollup of 7 pull requests

Successful merges:

 - #60344 (Don't try to render auto-trait bounds with any inference variables)
 - #60354 (Cleanup declare_features! for 'accepted' with a uniform style + sort them)
 - #60362 (Cleanup 'active' declare_features! with uniform style + sorting.)
 - #60382 (Revert "Update Source Code Pro fonts to version 2.030")
 - #60399 (Update clippy)
 - #60400 (Remove functions to simplify handling of feature(bind_by_move_pattern_guards))
 - #60408 (Add missing f16c_target_feature check to typeck collect)

Failed merges:

r? @ghost

5 years agoRollup merge of #60408 - gnzlbg:f16c2, r=Centril
Mazdak Farrokhzad [Tue, 30 Apr 2019 14:10:33 +0000 (16:10 +0200)]
Rollup merge of #60408 - gnzlbg:f16c2, r=Centril

Add missing f16c_target_feature check to typeck collect

5 years agoRollup merge of #60400 - JohnTitor:simplify-feature, r=matthewjasper
Mazdak Farrokhzad [Tue, 30 Apr 2019 14:10:31 +0000 (16:10 +0200)]
Rollup merge of #60400 - JohnTitor:simplify-feature, r=matthewjasper

Remove functions to simplify handling of feature(bind_by_move_pattern_guards)

Fixes #59192

r? @matthewjasper

5 years agoRollup merge of #60399 - Manishearth:clippyup, r=Manishearth
Mazdak Farrokhzad [Tue, 30 Apr 2019 14:10:30 +0000 (16:10 +0200)]
Rollup merge of #60399 - Manishearth:clippyup, r=Manishearth

Update clippy

None

5 years agoRollup merge of #60382 - Manishearth:revert-code-font, r=GuillaumeGomez
Mazdak Farrokhzad [Tue, 30 Apr 2019 14:10:29 +0000 (16:10 +0200)]
Rollup merge of #60382 - Manishearth:revert-code-font, r=GuillaumeGomez

Revert "Update Source Code Pro fonts to version 2.030"

Temporary fix for https://github.com/rust-lang/rust/issues/60365

https://github.com/rust-lang/rust/pull/60146 updated all fonts (not just the fonts that were buggy), however it looks like the new Source Code Pro is buggy.

We should test this out of tree: `cargo doc` on anything, replace the font in `target/doc`, and use `python -m SimpleHTTPServer` to see what's going on.

Till we figure that out, I'll just back this out.

r? @GuillaumeGomez

This reverts commit 6bafc58cedc6f409dbcd8919a25b2f5d425f42ae.

5 years agoRollup merge of #60362 - Centril:cleanup-declare-features-active, r=oli-obk
Mazdak Farrokhzad [Tue, 30 Apr 2019 14:10:27 +0000 (16:10 +0200)]
Rollup merge of #60362 - Centril:cleanup-declare-features-active, r=oli-obk

Cleanup 'active' declare_features! with uniform style + sorting.

r? @oli-obk

(added the FIXME you wanted)
cc https://github.com/rust-lang/rust/pull/60354
cc https://github.com/rust-lang/rust/issues/60361

5 years agoRollup merge of #60354 - Centril:cleanup-declare-features-accepted, r=oli-obk
Mazdak Farrokhzad [Tue, 30 Apr 2019 14:10:26 +0000 (16:10 +0200)]
Rollup merge of #60354 - Centril:cleanup-declare-features-accepted, r=oli-obk

Cleanup declare_features! for 'accepted' with a uniform style + sort them

r? @oli-obk

cc https://github.com/rust-lang/rust/pull/60362
cc https://github.com/rust-lang/rust/issues/60361

5 years agoRollup merge of #60344 - Aaron1011:fix/tower-hyper, r=eddyb
Mazdak Farrokhzad [Tue, 30 Apr 2019 14:10:25 +0000 (16:10 +0200)]
Rollup merge of #60344 - Aaron1011:fix/tower-hyper, r=eddyb

Don't try to render auto-trait bounds with any inference variables

Previously, we checked if the target of a projection type was itself an
inference variable. However, for Rustdoc rendering purposes, there's no
distinction between an inference variable ('_') and a type containing
one (e.g. (MyStruct<u8, _>)) - we don't want to render either of them.

Fixes #60269

Due to the complexity of the original bug, which spans three different
crates (hyper, tower-hyper, and tower), I have been unable to create a
minimized reproduction for the issue.

5 years agoOnly allow ZSTs with 1 byte alignment
Tim Diekmann [Tue, 30 Apr 2019 12:38:17 +0000 (14:38 +0200)]
Only allow ZSTs with 1 byte alignment

5 years agoAuto merge of #60159 - estebank:type-mismatch-cast, r=oli-obk
bors [Tue, 30 Apr 2019 12:28:11 +0000 (12:28 +0000)]
Auto merge of #60159 - estebank:type-mismatch-cast, r=oli-obk

Suggest `try_into` when possible

CC #47168

5 years agoAdd missing f16c_target_feature check to typeck collect
gnzlbg [Tue, 30 Apr 2019 10:32:34 +0000 (12:32 +0200)]
Add missing f16c_target_feature check to typeck collect

5 years agorustdoc: refactor(?) synthetic impl building.
Eduard-Mihai Burtescu [Mon, 22 Apr 2019 19:52:51 +0000 (22:52 +0300)]
rustdoc: refactor(?) synthetic impl building.

5 years agorustdoc: remove def_ctor hack.
Eduard-Mihai Burtescu [Sat, 20 Apr 2019 15:27:44 +0000 (18:27 +0300)]
rustdoc: remove def_ctor hack.

5 years agoImplement `BorrowMut<str>` for `String`
YOSHIOKA Takuma [Tue, 30 Apr 2019 06:52:07 +0000 (15:52 +0900)]
Implement `BorrowMut<str>` for `String`

Closes rust-lang/rfcs#1282.

5 years agoAdd local LLD to the PATH for run-make-fulldeps tests.
Michael Woerister [Tue, 30 Apr 2019 08:01:54 +0000 (10:01 +0200)]
Add local LLD to the PATH for run-make-fulldeps tests.

5 years agoRemove functions to simplify
Yuki OKUSHI [Tue, 30 Apr 2019 06:25:37 +0000 (15:25 +0900)]
Remove functions to simplify

5 years agoUpdate clippy
Manish Goregaokar [Tue, 30 Apr 2019 05:37:00 +0000 (22:37 -0700)]
Update clippy

5 years agoAuto merge of #60389 - Centril:rollup-nefreyr, r=Centril
bors [Tue, 30 Apr 2019 02:27:07 +0000 (02:27 +0000)]
Auto merge of #60389 - Centril:rollup-nefreyr, r=Centril

Rollup of 4 pull requests

Successful merges:

 - #59869 (SGX target: implemented vectored I/O)
 - #60238 (Update rustfmt to 1.2.2)
 - #60276 (Cleanup the MIR visitor)
 - #60380 (Fix line number display in source view)

Failed merges:

r? @ghost

5 years agoRollup merge of #60380 - GuillaumeGomez:fix-line-number-display, r=Manishearth
Mazdak Farrokhzad [Tue, 30 Apr 2019 01:28:39 +0000 (03:28 +0200)]
Rollup merge of #60380 - GuillaumeGomez:fix-line-number-display, r=Manishearth

Fix line number display in source view

Fixes #60310.

r? rust-lang/rustdoc

cc @Manishearth

screenshot of the fix:

<img width="798" alt="Screenshot 2019-04-29 at 23 12 20" src="https://user-images.githubusercontent.com/3050060/56927541-b7286680-6ad4-11e9-9215-42dc4ef42691.png">

5 years agoRollup merge of #60276 - matthewjasper:cleanup-mir-visitor, r=estebank
Mazdak Farrokhzad [Tue, 30 Apr 2019 01:28:38 +0000 (03:28 +0200)]
Rollup merge of #60276 - matthewjasper:cleanup-mir-visitor, r=estebank

Cleanup the MIR visitor

* Remove useless `BasicBlock` parameters on methods with `Location`s.
* Prefer `visit_terminator_kind` to `visit_terminator`.
* Remove `Region` from PlaceContexts. `visit_rvalue` should be used when the region is important.
* Remove unused visitor methods.

5 years agoRollup merge of #60238 - topecongiro:rustfmt-1.2.2, r=alexcrichton
Mazdak Farrokhzad [Tue, 30 Apr 2019 01:28:37 +0000 (03:28 +0200)]
Rollup merge of #60238 - topecongiro:rustfmt-1.2.2, r=alexcrichton

Update rustfmt to 1.2.2

5 years agoRollup merge of #59869 - jethrogb:jb/sgx-iovec, r=sfackler
Mazdak Farrokhzad [Tue, 30 Apr 2019 01:28:35 +0000 (03:28 +0200)]
Rollup merge of #59869 - jethrogb:jb/sgx-iovec, r=sfackler

SGX target: implemented vectored I/O

r? @sfackler

Includes #59857

5 years agoCleanup 'active' declare_features! with uniform style + sorting.
Mazdak Farrokhzad [Sun, 28 Apr 2019 23:46:45 +0000 (01:46 +0200)]
Cleanup 'active' declare_features! with uniform style + sorting.

5 years agoAccount for const fns to avoid incorrect suggestions
Esteban Küber [Tue, 30 Apr 2019 00:14:31 +0000 (17:14 -0700)]
Account for const fns to avoid incorrect suggestions

5 years agoSGX target: implemented vectored I/O
Jethro Beekman [Thu, 11 Apr 2019 02:47:10 +0000 (19:47 -0700)]
SGX target: implemented vectored I/O

5 years agoSGX target: don't unwind on usercall index out of bounds
Jethro Beekman [Thu, 11 Apr 2019 02:46:29 +0000 (19:46 -0700)]
SGX target: don't unwind on usercall index out of bounds

5 years agoAuto merge of #60006 - nnethercote:json-for-pipelining, r=alexcrichton
bors [Mon, 29 Apr 2019 23:35:01 +0000 (23:35 +0000)]
Auto merge of #60006 - nnethercote:json-for-pipelining, r=alexcrichton

In JSON output, emit a directive after metadata is generated.

To implement pipelining, Cargo needs to know when metadata generation is
finished. This is done via a new JSON "directive".

Unfortunately, metadata file writing currently occurs very late during
compilation, so pipelining won't produce a speed-up. Moving metadata
file writing earlier will be a follow-up.

r? @alexcrichton

5 years agoIn JSON output, emit a directive after metadata is generated.
Nicholas Nethercote [Sun, 14 Apr 2019 22:26:08 +0000 (08:26 +1000)]
In JSON output, emit a directive after metadata is generated.

To implement pipelining, Cargo needs to know when metadata generation is
finished. This commit adds code to do that. Unfortunately, metadata file
writing currently occurs very late during compilation, so pipelining
won't produce a speed-up. Moving metadata file writing earlier will be a
follow-up.

The change involves splitting the existing `Emitter::emit` method in
two: `Emitter::emit_diagnostic` and `Emitter::emit_directive`.

The JSON directives look like this:
```
{"directive":"metadata file written: liba.rmeta"}
```
The functionality is behind the `-Z emit-directives` option, and also
requires `--error-format=json`.

5 years agoAdd test
Esteban Küber [Sun, 21 Apr 2019 22:57:00 +0000 (15:57 -0700)]
Add test

5 years agoSuggest try_into when possible
Esteban Küber [Sun, 21 Apr 2019 22:44:23 +0000 (15:44 -0700)]
Suggest try_into when possible

5 years agoRevert "Update Source Code Pro fonts to version 2.030"
Manish Goregaokar [Mon, 29 Apr 2019 21:15:28 +0000 (14:15 -0700)]
Revert "Update Source Code Pro fonts to version 2.030"

This reverts commit 6bafc58cedc6f409dbcd8919a25b2f5d425f42ae.

5 years agoFix line number display in source view
Guillaume Gomez [Mon, 29 Apr 2019 21:13:30 +0000 (23:13 +0200)]
Fix line number display in source view

5 years agoAuto merge of #60377 - Centril:rollup-42fxe9u, r=Centril
bors [Mon, 29 Apr 2019 20:40:49 +0000 (20:40 +0000)]
Auto merge of #60377 - Centril:rollup-42fxe9u, r=Centril

Rollup of 9 pull requests

Successful merges:

 - #59946 (Fix equivalent string in escape_default docs)
 - #60256 (Option::flatten)
 - #60305 (hir: remove LoweredNodeId)
 - #60334 (Stabilized vectored IO)
 - #60353 (Add test not to forget resolved ICE)
 - #60356 (Stabilize str::as_mut_ptr)
 - #60358 (Clarify the short explanation of E0207)
 - #60359 (resolve: Consider erroneous imports used to avoid duplicate diagnostics)
 - #60360 (Add test case for labeled break in const assignment)

Failed merges:

r? @ghost

5 years agoRollup merge of #60360 - rasendubi:const-labeled-break, r=Centril
Mazdak Farrokhzad [Mon, 29 Apr 2019 20:22:46 +0000 (22:22 +0200)]
Rollup merge of #60360 - rasendubi:const-labeled-break, r=Centril

Add test case for labeled break in const assignment

Fixes #51350.

5 years agoRollup merge of #60359 - petrochenkov:imperruse, r=estebank
Mazdak Farrokhzad [Mon, 29 Apr 2019 20:22:45 +0000 (22:22 +0200)]
Rollup merge of #60359 - petrochenkov:imperruse, r=estebank

resolve: Consider erroneous imports used to avoid duplicate diagnostics

Supersedes https://github.com/rust-lang/rust/pull/60295
Fixes https://github.com/rust-lang/rust/issues/48244
r? @estebank

5 years agoRollup merge of #60358 - nickolay:patch-1, r=GuillaumeGomez
Mazdak Farrokhzad [Mon, 29 Apr 2019 20:22:44 +0000 (22:22 +0200)]
Rollup merge of #60358 - nickolay:patch-1, r=GuillaumeGomez

Clarify the short explanation of E0207

After being greatly improved in #33692, https://doc.rust-lang.org/error-index.html#E0207 uses terminology from the related RFC, which is different from the [reference](https://doc.rust-lang.org/reference/items/implementations.html), e.g. "self type" instead of "implementing type" and "trait reference" instead of "implemented trait".

It probably makes no difference to an experienced reader, but for a newbie like me it added to the confusion as you can't look up the definition of the terms being used and can't be sure you've guessed correctly...

I would also move the link to RFC to the top, as it seems to be the only doc that attempts to explain what the third criteria entails), but it seems to go against the accepted style.

5 years agoRollup merge of #60356 - JohnTitor:stabilize-as-mut-ptr, r=Centril
Mazdak Farrokhzad [Mon, 29 Apr 2019 20:22:42 +0000 (22:22 +0200)]
Rollup merge of #60356 - JohnTitor:stabilize-as-mut-ptr, r=Centril

Stabilize str::as_mut_ptr

Closes #58215

5 years agoRollup merge of #60353 - JohnTitor:add-test, r=Centril
Mazdak Farrokhzad [Mon, 29 Apr 2019 20:22:41 +0000 (22:22 +0200)]
Rollup merge of #60353 - JohnTitor:add-test, r=Centril

Add test not to forget resolved ICE

closes #55499

I added the example as a test.

r? @pnkfelix

5 years agoRollup merge of #60334 - sfackler:stable-iovec, r=alexcrichton
Mazdak Farrokhzad [Mon, 29 Apr 2019 20:22:40 +0000 (22:22 +0200)]
Rollup merge of #60334 - sfackler:stable-iovec, r=alexcrichton

Stabilized vectored IO

This renames `std::io::IoVec` to `std::io::IoSlice` and
`std::io::IoVecMut` to `std::io::IoSliceMut`, and stabilizes
`std::io::IoSlice`, `std::io::IoSliceMut`,
`std::io::Read::read_vectored`, and `std::io::Write::write_vectored`.

Closes #58452

r? @alexcrichton

5 years agoRollup merge of #60305 - ljedrz:remove_LoweredNodeId, r=Zoxc
Mazdak Farrokhzad [Mon, 29 Apr 2019 20:22:38 +0000 (22:22 +0200)]
Rollup merge of #60305 - ljedrz:remove_LoweredNodeId, r=Zoxc

hir: remove LoweredNodeId

It seems that we no longer need it, because nowadays we just want the `HirId` most of the time.

5 years agoRollup merge of #60256 - ethanboxx:master, r=alexcrichton
Mazdak Farrokhzad [Mon, 29 Apr 2019 20:22:36 +0000 (22:22 +0200)]
Rollup merge of #60256 - ethanboxx:master, r=alexcrichton

Option::flatten

This PR makes this possible.
```rust
assert_eq!(Some(6), Some(Some(6)).flatten());
assert_eq!(Some(6), Some(Some(6)).into());
```

5 years agoRollup merge of #59946 - mernen:patch-2, r=ehuss
Mazdak Farrokhzad [Mon, 29 Apr 2019 20:22:34 +0000 (22:22 +0200)]
Rollup merge of #59946 - mernen:patch-2, r=ehuss

Fix equivalent string in escape_default docs

This newline should be escaped.

5 years agoAuto merge of #60355 - Manishearth:clippyup, r=centril
bors [Mon, 29 Apr 2019 17:44:15 +0000 (17:44 +0000)]
Auto merge of #60355 - Manishearth:clippyup, r=centril

Update clippy

r? @centril

5 years agoUpdate clippy
Manish Goregaokar [Mon, 29 Apr 2019 05:34:51 +0000 (22:34 -0700)]
Update clippy

5 years agoAuto merge of #60039 - rasendubi:assert-trailing-junk, r=alexcrichton
bors [Mon, 29 Apr 2019 14:50:17 +0000 (14:50 +0000)]
Auto merge of #60039 - rasendubi:assert-trailing-junk, r=alexcrichton

Make assert! ensure the macro is parsed completely

Fixes https://github.com/rust-lang/rust/issues/60024

5 years agobuild-gcc: Create missing cc symlink
lzutao [Mon, 29 Apr 2019 07:05:48 +0000 (14:05 +0700)]
build-gcc: Create missing cc symlink

5 years agobootstrap: Don't add LLVM's bin directory to the PATH for tool invocations.
Michael Woerister [Mon, 29 Apr 2019 12:40:07 +0000 (14:40 +0200)]
bootstrap: Don't add LLVM's bin directory to the PATH for tool invocations.

5 years agocompiletest: Make LLVM's bin directory available to run-make-fulldeps tests.
Michael Woerister [Mon, 29 Apr 2019 12:38:25 +0000 (14:38 +0200)]
compiletest: Make LLVM's bin directory available to run-make-fulldeps tests.

5 years agoSupport ZSTs in DispatchFromDyn
Tim Diekmann [Mon, 29 Apr 2019 00:55:43 +0000 (02:55 +0200)]
Support ZSTs in DispatchFromDyn

5 years agohir: remove LoweredNodeId
ljedrz [Fri, 26 Apr 2019 12:23:30 +0000 (14:23 +0200)]
hir: remove LoweredNodeId

5 years agoAuto merge of #60364 - JohnTitor:stabilize-const-needs-drop, r=oli-obk
bors [Mon, 29 Apr 2019 09:48:11 +0000 (09:48 +0000)]
Auto merge of #60364 - JohnTitor:stabilize-const-needs-drop, r=oli-obk

const-stabilize: std::mem::needs_drop

Closes #51929

r? @oli-obk

5 years agoAuto merge of #60338 - petrochenkov:notidy, r=varkor
bors [Mon, 29 Apr 2019 05:18:12 +0000 (05:18 +0000)]
Auto merge of #60338 - petrochenkov:notidy, r=varkor

tidy: Fix some more false positives for long URLs

A URL that's simply longer than 100 characters is ok regardless of context.

r? @varkor

5 years agoconst-stabilize std::mem::needs_drop
Yuki OKUSHI [Mon, 29 Apr 2019 03:41:06 +0000 (12:41 +0900)]
const-stabilize std::mem::needs_drop

5 years agoAuto merge of #60182 - matklad:lexer-cleanup, r=petrochenkov
bors [Mon, 29 Apr 2019 01:22:12 +0000 (01:22 +0000)]
Auto merge of #60182 - matklad:lexer-cleanup, r=petrochenkov

Lexer cleanup

another couple of tiny cleanups

5 years agoAuto merge of #60317 - flip1995:internal_lints, r=oli-obk
bors [Sun, 28 Apr 2019 20:42:09 +0000 (20:42 +0000)]
Auto merge of #60317 - flip1995:internal_lints, r=oli-obk

Internal lints: usage_of_qualified_ty & ty_pass_by_reference

Closes #59952

Implements internal lints:

- `USAGE_OF_QUALIFIED_TY`
- `TY_PASS_BY_REFERENCE`

r? @oli-obk

5 years agoRemove unused TyCtxt argument from allow_two_phase_borrow function
flip1995 [Sun, 28 Apr 2019 19:13:33 +0000 (21:13 +0200)]
Remove unused TyCtxt argument from allow_two_phase_borrow function

5 years agoAdd test case for labeled break in const assignment
Alexey Shmalko [Sun, 28 Apr 2019 20:12:35 +0000 (23:12 +0300)]
Add test case for labeled break in const assignment

See https://github.com/rust-lang/rust/issues/51350 for more information.

5 years agoClarify the short explanation of E0207
Nickolay Ponomarev [Sun, 28 Apr 2019 19:32:28 +0000 (22:32 +0300)]
Clarify the short explanation of E0207

- Use the terms from the reference <https://doc.rust-lang.org/reference/items/implementations.html>
- Add code snippets to explain the terms

5 years agoresolve: Consider erroneous imports used to avoid duplicate diagnostics
Vadim Petrochenkov [Sun, 28 Apr 2019 18:27:01 +0000 (21:27 +0300)]
resolve: Consider erroneous imports used to avoid duplicate diagnostics

5 years agoFix lint findings in librustdoc
flip1995 [Sat, 27 Apr 2019 16:37:18 +0000 (18:37 +0200)]
Fix lint findings in librustdoc

5 years agoFix lint findings in librustc_mir
flip1995 [Fri, 26 Apr 2019 12:26:49 +0000 (14:26 +0200)]
Fix lint findings in librustc_mir

5 years agoFix lint findings in librustc_traits
flip1995 [Fri, 26 Apr 2019 12:10:46 +0000 (14:10 +0200)]
Fix lint findings in librustc_traits

5 years agoFix lint findings in librustc_typeck
flip1995 [Fri, 26 Apr 2019 11:41:10 +0000 (13:41 +0200)]
Fix lint findings in librustc_typeck

5 years agoFix lint findings in librustc_metadata
flip1995 [Fri, 26 Apr 2019 09:44:42 +0000 (11:44 +0200)]
Fix lint findings in librustc_metadata

5 years agoFix lint findings in librustc
flip1995 [Thu, 25 Apr 2019 20:54:19 +0000 (22:54 +0200)]
Fix lint findings in librustc

5 years agoUpdate *.stderr files
flip1995 [Wed, 24 Apr 2019 21:24:00 +0000 (23:24 +0200)]
Update *.stderr files

5 years agoAdd tests
flip1995 [Wed, 24 Apr 2019 21:23:44 +0000 (23:23 +0200)]
Add tests

5 years agoImplement internal lints
flip1995 [Wed, 24 Apr 2019 21:22:54 +0000 (23:22 +0200)]
Implement internal lints

- USAGE_OF_QUALIFIED_TY

- TY_PASS_BY_REFERENCE

5 years agoStabilize str::as_mut_ptr
Yuki OKUSHI [Sun, 28 Apr 2019 17:33:50 +0000 (02:33 +0900)]
Stabilize str::as_mut_ptr

5 years agoAuto merge of #60352 - Centril:const-incomplete-features, r=oli-obk
bors [Sun, 28 Apr 2019 15:40:00 +0000 (15:40 +0000)]
Auto merge of #60352 - Centril:const-incomplete-features, r=oli-obk

Float 'incomplete_features' out to a const for visibility

Float `let incomplete_features` out to a `const INCOMPLETE_FEATURES` and colocate near `active` features so that it is easier to find and edit.

r? @oli-obk

(use rollup)

5 years agoCleanup declare_features! for 'accepted' with a uniform style + sort them.
Mazdak Farrokhzad [Sun, 28 Apr 2019 14:14:21 +0000 (16:14 +0200)]
Cleanup declare_features! for 'accepted' with a uniform style + sort them.

5 years agoAdd test
Yuki OKUSHI [Sun, 28 Apr 2019 13:54:06 +0000 (22:54 +0900)]
Add test

5 years agoFloat 'incomplete_features' out to a const for visibility.
Mazdak Farrokhzad [Sun, 28 Apr 2019 13:13:35 +0000 (15:13 +0200)]
Float 'incomplete_features' out to a const for visibility.

5 years agoAuto merge of #60351 - Centril:rollup-5xv3tka, r=Centril
bors [Sun, 28 Apr 2019 12:50:06 +0000 (12:50 +0000)]
Auto merge of #60351 - Centril:rollup-5xv3tka, r=Centril

Rollup of 4 pull requests

Successful merges:

 - #60022 (Document `Item` type in `std::env::SplitPaths` iterator.)
 - #60270 (rustc: Flag metadata compatible with multiple CGUs)
 - #60325 (Document ast::ExprKind::Type)
 - #60347 (Remove `-Z two-phase-borrows` and `-Z two-phase-beyond-autoref`)

Failed merges:

r? @ghost

5 years agoRollup merge of #60347 - JohnTitor:remove-flags, r=matthewjasper
Mazdak Farrokhzad [Sun, 28 Apr 2019 12:17:12 +0000 (14:17 +0200)]
Rollup merge of #60347 - JohnTitor:remove-flags, r=matthewjasper

Remove `-Z two-phase-borrows` and `-Z two-phase-beyond-autoref`

fixes #60331

5 years agoRollup merge of #60325 - Centril:doc-ast-exprkind-type, r=oli-obk
Mazdak Farrokhzad [Sun, 28 Apr 2019 12:17:11 +0000 (14:17 +0200)]
Rollup merge of #60325 - Centril:doc-ast-exprkind-type, r=oli-obk

Document ast::ExprKind::Type

r? @oli-obk