Commit Graph

93897 Commits

Author SHA1 Message Date
Mazdak Farrokhzad
08f7724355
Rollup merge of #61084 - blkerby:unreachable_doc, r=KodrAus
Clarify docs for unreachable! macro

Fixes #60754.
2019-05-28 11:48:53 +02:00
bors
837b72c805 Auto merge of #60955 - agnxy:rename-assoc, r=oli-obk,Centril
Rename "Associated*" to "Assoc*"

This change is for #60163.

r? @oli-obk
2019-05-28 05:28:13 +00:00
bors
87ed0b421d Auto merge of #61036 - michaelwoerister:pgo-xlto-test, r=alexcrichton
PGO - Add a smoketest for combining PGO with cross-language LTO.

This PR

- Adds a test making sure that PGO can be combined with cross-language LTO.
- Does a little cleanup on how the `pgo-use` flag is handled internally.
- Makes the compiler error if the `pgo-use` file given to `rustc` doesn't actually exist. LLVM only gives a warning and then just doesn't do PGO. Clang, on the other hand, does give an error in this case.
- Makes the build system also build `compiler-rt` when building LLDB. This way the Clang compiler that we get from building LLDB can perform PGO, which is something that the new test case wants to do. CI compile times shouldn't be affected too much.
2019-05-28 01:56:44 +00:00
bors
b71117947f Auto merge of #61078 - pietroalbini:nightly-next, r=Centril
Bump nightly to 1.37.0

r? @Mark-Simulacrum
2019-05-27 23:04:54 +00:00
bors
e70d5386d7 Auto merge of #61140 - estebank:attr-diagnostics, r=michaelwoerister
Reword malformed attribute input diagnostics

- Handle empty `cfg_attr` attribute
- Reword empty `derive` attribute error
- Use consistend error message: "malformed `attrname` attribute input"
- Provide suggestions when possible
- Move note/help to label/suggestion
- Use consistent wording "ill-formed" -> "malformed"
- Move diagnostic logic out of parser

Split up from https://github.com/rust-lang/rust/pull/61026, where there's prior conversation.
2019-05-27 20:12:14 +00:00
bors
fa40a111ff Auto merge of #60827 - oli-obk:late_symbol, r=nnethercote
Use `Symbol` more in lint APIs

r? @nnethercote

This will cause clippy breakage, but super trivial to fix since we can then remove the hacky `match_def_path` function that I added and go back to calling rustc's `match_def_path` method.
2019-05-27 15:36:32 +00:00
Michael Woerister
577ea539dc Only build clang_rt when RUSTBUILD_FORCE_CLANG_BASED_TESTS is set. 2019-05-27 16:40:00 +02:00
bors
1a56ec4dae Auto merge of #59627 - LooMaclin:issue_57128_improve_miri_error_reporting_in_check_in_alloc, r=RalfJung
Improve miri error reporting in check_in_alloc

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

r? @RalfJung @oli-obk
2019-05-27 12:46:12 +00:00
Michael Woerister
48b9896eeb Fix unit test after pgo-use change. 2019-05-27 14:32:03 +02:00
Michael Woerister
1de93a7814 Add a smoketest for combining PGO with xLTO. 2019-05-27 14:32:03 +02:00
Michael Woerister
30a3fad316 rustbuild: Also build compiler-rt when building LLDB. This allows clang-based run-make tests to use PGO. 2019-05-27 14:32:03 +02:00
Michael Woerister
eeb7348dc3 PGO: Check that pgo-use file actually exists. LLVM seems to only emit an easy-to-overlook warning otherwise. 2019-05-27 14:32:03 +02:00
Michael Woerister
e943426045 Use a PathBuf instead of String for representing the pgo-use path internally. 2019-05-27 14:32:03 +02:00
Oliver Scherer
d6ca34c9d2 Use Symbol more in lint APIs 2019-05-27 12:28:54 +02:00
bors
4dbc7f96d6 Auto merge of #60967 - Zoxc:fix-syntax-sync, r=michaelwoerister
Short circuit Send and Sync impls for TokenTree

Workaround to make the parallel compiler build after https://github.com/rust-lang/rust/pull/60444.

r? @nikomatsakis
2019-05-27 09:49:18 +00:00
John Kåre Alsaker
3ed05613ee Short circuit Send and Sync impls for TokenTree 2019-05-27 08:58:05 +02:00
bors
ab7cf71d4c Auto merge of #61035 - nnethercote:avoid-more-symbol-interning, r=petrochenkov
Avoid more symbol interning

r? @petrochenkov
2019-05-27 06:53:53 +00:00
Nicholas Nethercote
33a3206dc5 Use Symbol equality in may_begin_with and parse_nt. 2019-05-27 14:05:05 +10:00
Nicholas Nethercote
15789a9773 Use Symbol equality in check_ident_token. 2019-05-27 14:05:05 +10:00
Nicholas Nethercote
8ae01a9008 Use Symbol equality in is_ident_named. 2019-05-27 14:05:05 +10:00
Nicholas Nethercote
303bf1509b Avoid some re-interning in to_lit_token. 2019-05-27 14:05:05 +10:00
Nicholas Nethercote
21f28448e0 Add to_symbol methods. 2019-05-27 14:05:02 +10:00
bors
be10e6277b Auto merge of #61215 - paoloteti:armebv7r, r=alexcrichton
Docker: remove environment variable `CC_armebv7r_none_eabi`

`cc-rs` take care of selecting the tool-chain, so this `ENV` variable can be safely removed.
2019-05-27 03:58:56 +00:00
Nicholas Nethercote
9c7d28d4fd Pre-intern "0", "1", ..., "9", and use where appropriate. 2019-05-27 13:58:38 +10:00
Nicholas Nethercote
58c68d00fd Pass symbols to ExtCtxt::std_path instead of strings.
Because this function is hot.

Also remove the dead `ty_option` function.
2019-05-27 13:58:38 +10:00
Nicholas Nethercote
26451ef7b5 Avoid unnecessary internings.
Most involving `Symbol::intern` on string literals.
2019-05-27 13:58:38 +10:00
Nicholas Nethercote
6c0ff3dd97 Avoid interning in resolve_place_op.
This function is hot for `keccak`.
2019-05-27 13:58:38 +10:00
bors
ed2a5115da Auto merge of #61147 - estebank:suggest-as-ref, r=oli-obk
When encountering move error on an `Option`, suggest using `as_ref`

Fix #61109, cc #15457.
2019-05-27 01:10:22 +00:00
bors
37c45ec398 Auto merge of #61214 - oli-obk:clippy, r=Manishearth
Update clippy submodule

r? @Manishearth
2019-05-26 21:38:04 +00:00
bors
5187be620c Auto merge of #61213 - pietroalbini:fix-azure-multiple-checkouts, r=alexcrichton
azure: fix multiple checkouts on azure

We were checking out the rustc repo multiple times on auto macOS, and
that was causing an error on the Azure side since multiple checkouts are
apparently not supported. This removes the extra checkout.

r? @alexcrichton
fixes #61170
2019-05-26 18:48:12 +00:00
Paolo Teti
6e4c12c768 Docker: remove environment variable CC_armebv7r_none_eabi
`cc-rs` take care of selecting the tool-chain, so this ENV variable
can be safely removed.
2019-05-26 19:31:40 +02:00
Oliver Scherer
2a789518b0 Update cargo lockfile 2019-05-26 19:21:54 +02:00
Oliver Scherer
e8b09ff92b Update clippy submodule 2019-05-26 18:59:51 +02:00
Pietro Albini
4af19b0ce9
ci: increase timeout on the auto branch in azure 2019-05-26 18:35:32 +02:00
Pietro Albini
d185feae4f
ci: fix multiple checkouts on azure
We were checking out the rustc repo multiple times on auto macOS, and
that was causing an error on the Azure side since multiple checkouts are
apparently not supported. This removes the extra checkout.
2019-05-26 17:12:13 +02:00
bors
dc6db14e1c Auto merge of #61210 - Centril:rollup-ofr6h5b, r=Centril
Rollup of 4 pull requests

Successful merges:

 - #61077 (Don't arena-allocate static symbols.)
 - #61102 (Move path for iterate)
 - #61120 (Make eval_place iterate instead of recurse)
 - #61205 (docs: fix typo #61197)

Failed merges:

r? @ghost
2019-05-26 12:24:25 +00:00
Rust
9e643e6792
Improve miri's error reporting in check_in_alloc
Co-Authored-By: Ralf Jung <post@ralfj.de>
2019-05-26 14:44:58 +03:00
Mazdak Farrokhzad
e9933ee099
Rollup merge of #61205 - airt:docs-fix-typo-#61197, r=Centril
docs: fix typo #61197

Fixes #61197

Change `#[doc(inline)}` to `#[doc(inline)]` in the [#[doc]](https://doc.rust-lang.org/rustdoc/the-doc-attribute.html) documentation.
2019-05-26 13:37:59 +02:00
Mazdak Farrokhzad
c3e1f99a69
Rollup merge of #61120 - spastorino:eval-place-iterate, r=oli-obk
Make eval_place iterate instead of recurse

r? @oli-obk
2019-05-26 13:37:57 +02:00
Mazdak Farrokhzad
a40b82bead
Rollup merge of #61102 - spastorino:move-path-for-iterate, r=oli-obk
Move path for iterate

r? @oli-obk
2019-05-26 13:37:56 +02:00
Mazdak Farrokhzad
58eb22fdae
Rollup merge of #61077 - nnethercote:tweak-prefill, r=petrochenkov
Don't arena-allocate static symbols.

It's just a waste of memory. This also gets rid of the special case for
"".

r? @petrochenkov
2019-05-26 13:37:55 +02:00
loomaclin
ffd0dc79da Improve miri's error reporting in check_in_alloc 2019-05-26 13:26:24 +03:00
Andrew Xu
c963596c03 Rename "Associated*" to "Assoc*"
modify pretty.rs which recently added "Associated*"
2019-05-26 17:49:02 +08:00
Andrew Xu
46b9ed4fa1 Rename "Associated*" to "Assoc*"
We are going to uniform the terminology of all associated items.
Methods that may or may not have `self` are called "associated
functions". Because `AssociatedFn` is a bit long, we rename `Associated`
to `Assoc`.
2019-05-26 17:49:02 +08:00
bors
566f3d7b08 Auto merge of #61080 - mati865:mingw_pgo, r=sanxiyn
Ship profiler with windows-gnu

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

I don't know if we can enable it for testing, windows-gnu jobs are already taking too long: https://github.com/rust-lang/rust/issues/59637.

r? @michaelwoerister

P.S.
I have tested only x86_64 build.
2019-05-26 09:40:11 +00:00
bors
2268d9923b Auto merge of #61201 - Centril:rollup-975knrk, r=Centril
Rollup of 9 pull requests

Successful merges:

 - #61087 (Tweak `self` arg not as first argument of a method diagnostic)
 - #61114 (Vec: avoid creating slices to the elements)
 - #61144 (Suggest borrowing for loop head on move error)
 - #61149 (Fix spelling in release notes)
 - #61161 (MaybeUninit doctest: remove unnecessary type ascription)
 - #61173 (Auto-derive Encode and Decode implementations of DefPathTable)
 - #61184 (Add additional trace statements to the const propagator)
 - #61189 (Turn turbo 🐟 🍨 into an error)
 - #61193 (Add comment to explain why we change the layout for Projection)

Failed merges:

r? @ghost
2019-05-26 06:09:08 +00:00
airt
dbf8c6df9d
docs: fix typo #61197 2019-05-26 12:17:33 +08:00
bors
572892c324 Auto merge of #60852 - alexcrichton:std-backtrace, r=sfackler
std: Depend on `backtrace` crate from crates.io

This commit removes all in-tree support for generating backtraces in
favor of depending on the `backtrace` crate on crates.io. This resolves
a very longstanding piece of duplication where the standard library has
long contained the ability to generate a backtrace on panics, but the
code was later extracted and duplicated on crates.io with the
`backtrace` crate. Since that fork each implementation has seen various
improvements one way or another, but typically `backtrace`-the-crate has
lagged behind libstd in one way or another.

The goal here is to remove this duplication of a fairly critical piece
of code and ensure that there's only one source of truth for generating
backtraces between the standard library and the crate on crates.io.
Recently I've been working to bring the `backtrace` crate on crates.io
up to speed with the support in the standard library which includes:

* Support for `StackWalkEx` on MSVC to recover inline frames with
  debuginfo.
* Using `libbacktrace` by default on MinGW targets.
* Supporting `libbacktrace` on OSX as an option.
* Ensuring all the requisite support in `backtrace`-the-crate compiles
  with `#![no_std]`.
* Updating the `libbacktrace` implementation in `backtrace`-the-crate to
  initialize the global state with the correct filename where necessary.

After reviewing the code in libstd the `backtrace` crate should be at
exact feature parity with libstd today. The backtraces generated should
have the same symbols and same number of frames in general, and there's
not known divergence from libstd currently.

Note that one major difference between libstd's backtrace support and
the `backtrace` crate is that on OSX the crates.io crate enables the
`coresymbolication` feature by default. This feature, however, uses
private internal APIs that aren't published for OSX. While they provide
more accurate backtraces this isn't appropriate for libstd distributed
as a binary, so libstd's dependency on the `backtrace` crate explicitly
disables this feature and forces OSX to use `libbacktrace` as a
symbolication strategy.

The long-term goal of this refactoring is to eventually move us towards
a world where we can drop `libbacktrace` entirely and simply use Gimli
and the surrounding crates for backtrace support. That's still aways off
but hopefully will much more easily enabled by having the source of
truth for backtraces live in crates.io!

Procedurally if we go forward with this I'd like to transfer the
`backtrace-rs` crate to the rust-lang GitHub organization as well, but I
figured I'd hold off on that until we get closer to merging.
2019-05-26 03:26:10 +00:00
Mazdak Farrokhzad
8d247e716b
Rollup merge of #61193 - spastorino:add-comment, r=RalfJung
Add comment to explain why we change the layout for Projection

r? @RalfJung

Addresses the comment in https://github.com/rust-lang/rust/pull/61104/files#r287556257
2019-05-26 02:13:35 +02:00
Mazdak Farrokhzad
6ae3c2b2a4
Rollup merge of #61189 - oli-obk:turbofish_ice, r=varkor
Turn turbo 🐟 🍨 into an error

Master branch part of #60989

r? @varkor
2019-05-26 02:13:33 +02:00