Commit graph

92913 commits

Author SHA1 Message Date
Mazdak Farrokhzad
edb3cf57dc
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
2019-05-01 08:29:12 +02:00
Mazdak Farrokhzad
6d78142bf0
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.
2019-05-01 08:29:11 +02:00
Mazdak Farrokhzad
1c2ea8f596
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
2019-05-01 08:29:10 +02:00
Mazdak Farrokhzad
a8b854bde0
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
2019-05-01 08:29:09 +02:00
bors
834bd1959c 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
2019-05-01 03:06:13 +00:00
Esteban Küber
a3aafea68f Account for paths in incorrect pub qualifier help 2019-04-30 17:48:18 -07:00
Nicholas Nethercote
3da5d4a87e Inline and remove link_binary_output.
This change simplifies things for the subsequent commit.
2019-05-01 10:33:08 +10:00
varkor
b7711bff52 Rename is_range_literal to is_lit 2019-05-01 00:08:01 +01:00
bors
96ee0ba59e 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.
2019-04-30 22:46:28 +00:00
varkor
80f90d866b Pull out some functors for readability 2019-04-30 23:37:38 +01:00
varkor
5e709b2910 Refactor is_range_literal 2019-04-30 23:17:58 +01:00
varkor
13962aff37 Include signed integer types in the lint 2019-04-30 22:43:51 +01:00
varkor
0556e4891e Preserve literal suffixes 2019-04-30 22:43:51 +01:00
varkor
218982bef0 Place types inside backticks 2019-04-30 22:43:51 +01:00
varkor
c5fdff26b5 Add a test for overflowing endpoints 2019-04-30 22:43:51 +01:00
varkor
5ec2f5e87e Suggest using an inclusive range for an overflowing endpoint 2019-04-30 22:43:51 +01:00
varkor
2cefd9987b Pull is_range_literal out into lowering 2019-04-30 22:43:51 +01:00
bors
7c71bc3208 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
2019-04-30 19:52:13 +00:00
Esteban Küber
ed08c6a985 review comments: change wording 2019-04-30 10:59:30 -07:00
Mazdak Farrokhzad
d58cb934cb Rename hir::ExprKind::Use to ::DropTemps and improve docs. 2019-04-30 18:06:00 +02:00
Michael Woerister
7c4cc01f79 Work around missing tac command on macOS in PGO run-make test. 2019-04-30 17:38:01 +02:00
Yuki OKUSHI
748d978c64 Fix run-pass test 2019-05-01 00:36:51 +09:00
bors
5b7baa53c9 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
2019-04-30 15:19:40 +00:00
Mazdak Farrokhzad
71a1b80213
Rollup merge of #60408 - gnzlbg:f16c2, r=Centril
Add missing f16c_target_feature check to typeck collect
2019-04-30 16:10:33 +02:00
Mazdak Farrokhzad
008e21d6f6
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
2019-04-30 16:10:31 +02:00
Mazdak Farrokhzad
e11ba74d99
Rollup merge of #60399 - Manishearth:clippyup, r=Manishearth
Update clippy

None
2019-04-30 16:10:30 +02:00
Mazdak Farrokhzad
32dac8c61d
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 6bafc58ced.
2019-04-30 16:10:29 +02:00
Mazdak Farrokhzad
8a17bbfb28
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
2019-04-30 16:10:27 +02:00
Mazdak Farrokhzad
17cb922b8b
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
2019-04-30 16:10:26 +02:00
Mazdak Farrokhzad
6547de2bdd
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.
2019-04-30 16:10:25 +02:00
Tim Diekmann
1b679e74f0
Only allow ZSTs with 1 byte alignment 2019-04-30 14:38:17 +02:00
Yuki OKUSHI
db7f265660 Fix spans 2019-04-30 21:28:34 +09:00
Yuki OKUSHI
f56d285443 Use multispan 2019-04-30 21:28:13 +09:00
bors
862a8784ab Auto merge of #60159 - estebank:type-mismatch-cast, r=oli-obk
Suggest `try_into` when possible

CC #47168
2019-04-30 12:28:11 +00:00
Yuki OKUSHI
bb3549fce2 Fix tests 2019-04-30 20:43:10 +09:00
Yuki OKUSHI
da46eeac88 Add error for existential types 2019-04-30 20:43:03 +09:00
gnzlbg
076241e774 Add missing f16c_target_feature check to typeck collect 2019-04-30 12:32:34 +02:00
Eduard-Mihai Burtescu
be9f43e0d4 rustdoc: refactor(?) synthetic impl building. 2019-04-30 13:10:48 +03:00
Eduard-Mihai Burtescu
c835607907 rustdoc: remove def_ctor hack. 2019-04-30 12:55:38 +03:00
YOSHIOKA Takuma
a0e112ba52
Implement BorrowMut<str> for String
Closes rust-lang/rfcs#1282.
2019-04-30 17:50:38 +09:00
Yuki OKUSHI
bf4d0adf23 Rename to RUSTC_LOG 2019-04-30 17:27:53 +09:00
Michael Woerister
7acead5e0a Add local LLD to the PATH for run-make-fulldeps tests. 2019-04-30 10:01:54 +02:00
Yuki OKUSHI
4945594c24 Remove functions to simplify 2019-04-30 17:00:36 +09:00
Manish Goregaokar
382e350f50 Update clippy 2019-04-29 22:37:00 -07:00
Nicholas Nethercote
faf5eac854 Move metadata encoding earlier.
This commit separates metadata encoding (`tcx.encode_metadata`) from the
creation of the metadata module (which is now handled by
`write_compressed_metadata`, formerly `write_metadata`).

The metadata encoding now occurs slightly earlier in the pipeline, at
the very start of code generation within `start_codegen`.

Metadata *writing* still occurs near the end of compilation; that will
be moved forward in subsequent commits.
2019-04-30 14:55:10 +10:00
Esteban Küber
6068478d56 Add if let test 2019-04-29 20:58:29 -07:00
Esteban Küber
14ca950665 Fix style 2019-04-29 20:50:04 -07:00
Esteban Küber
693eea5784 review comments 2019-04-29 19:56:50 -07:00
bors
f843ad60ef 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
2019-04-30 02:27:07 +00:00
Esteban Küber
ff68673387 add tests 2019-04-29 19:16:35 -07:00