Commit Graph

92380 Commits

Author SHA1 Message Date
Mazdak Farrokhzad
426ab8e018
Rollup merge of #59890 - GuillaumeGomez:empty-json-variables, r=QuietMisdreavus
Don't generate empty json variables

r? @rust-lang/rustdoc
2019-04-14 00:39:48 +02:00
Mazdak Farrokhzad
021a8eca47
Rollup merge of #59874 - michaelwoerister:pgo-updates-1, r=cramertj
Clean up handling of `-Z pgo-gen` commandline option.

This PR adapts the `-Z pgo-gen` flag to how Clang and GCC handle the corresponding `-fprofile-generate` flag. In particular, the flag now optionally takes a directory to place the profiling data in and allows to omit the argument (instead of having to pass an empty string).
2019-04-14 00:39:46 +02:00
Mazdak Farrokhzad
7ff376b3b2
Rollup merge of #59812 - michaelwoerister:profile-gen-msvc-imp, r=alexcrichton
Exclude profiler-generated symbols from MSVC __imp_-symbol workaround.

LLVM's profiling instrumentation adds a few symbols that are used by the profiler runtime. Since these show up as globals in the LLVM IR, the compiler generates `dllimport`-related `__imp_` stubs for them. This can lead to linker errors because the instrumentation symbols have weak linkage or are in a comdat section, but the `__imp_` stubs aren't.

Instead of trying to replicate the linkage/comdat setup for the stubs, this PR just excludes the profiler-related symbols from stub-generation since they aren't supposed to be referenced via `__declspec(dllimport)` anywhere anyway.

r? @alexcrichton

EDIT: I considered making this more general, i.e. inferring from the symbol name if it is a Rust symbol or not. But then I figured out that that would yield false negatives for `#[no_mangle]` et al, so I went with a blacklist approach.
2019-04-14 00:39:44 +02:00
Mazdak Farrokhzad
c4a3332d38
Rollup merge of #59784 - davidtwco:issue-59764, r=estebank
Suggest importing macros from the crate root

Fixes #59764.

r? @estebank
cc @varkor
2019-04-14 00:39:43 +02:00
Mazdak Farrokhzad
ae0bf84a14
Rollup merge of #59776 - GuillaumeGomez:apply-resource-suffix, r=QuietMisdreavus
Apply resource-suffix to search-index and source-files scripts as well

Fixes #59771.

r? @QuietMisdreavus
2019-04-14 00:39:41 +02:00
bors
00856722ba Auto merge of #59949 - Centril:rollup-lsiqq1g, r=Centril
Rollup of 16 pull requests

Successful merges:

 - #59675 (Stabilize the `alloc` crate.)
 - #59708 (Mark variables captured by reference as mutable correctly)
 - #59735 (remove lookup_char_pos_adj)
 - #59747 (Copy book.toml unstable book generator)
 - #59796 (Retire `IsNotConst` naming)
 - #59804 (Clean up jobserver integration)
 - #59818 (Eliminate `FnBox` usages from libstd.)
 - #59830 (Fix links on keyword docs.)
 - #59835 (Re-export NonZero signed variant in std)
 - #59852 (std: Add `{read,write}_vectored` for more types)
 - #59855 (Fix attributes position in type declaration)
 - #59858 (Make duplicate matcher bindings a hard error)
 - #59899 (In `-Zprint-type-size` output, sort enum variants by size.)
 - #59912 (MaybeUninit: remove deprecated functions)
 - #59925 (Fix paste error in split_ascii_whitespace docs.)
 - #59930 (Exclude some copies of old book editions from search engines)

Failed merges:

r? @ghost
2019-04-13 22:24:33 +00:00
Mazdak Farrokhzad
cf370b40dc
Rollup merge of #59930 - kornelski:first-robots, r=GuillaumeGomez
Exclude some copies of old book editions from search engines

These are only stubs that confuse search engine users. There's no useful content in these locations.
2019-04-14 00:23:50 +02:00
Mazdak Farrokhzad
2413ac7956
Rollup merge of #59925 - solson:split_ascii_whitespace-docfix, r=Centril
Fix paste error in split_ascii_whitespace docs.

It was accidentally still testing the unicode version, `split_whitespace`.
2019-04-14 00:23:49 +02:00
Mazdak Farrokhzad
8769297e97
Rollup merge of #59912 - RalfJung:maybe-uninit, r=Centril
MaybeUninit: remove deprecated functions
2019-04-14 00:23:47 +02:00
Mazdak Farrokhzad
857416b590
Rollup merge of #59899 - nnethercote:sort-enum-variants-by-size, r=pnkfelix
In `-Zprint-type-size` output, sort enum variants by size.

It's useful to see the biggest variants first.

r? @pnkfelix
2019-04-14 00:23:46 +02:00
Mazdak Farrokhzad
abfca1e155
Rollup merge of #59858 - mark-i-m:dup-matcher-bindings-3, r=Centril
Make duplicate matcher bindings a hard error

r? @Centril

Closes #57742
2019-04-14 00:23:44 +02:00
Mazdak Farrokhzad
8af5c8f4cb
Rollup merge of #59855 - GuillaumeGomez:fix-attr-position-in-type-decl, r=QuietMisdreavus
Fix attributes position in type declaration

Fixes #59797.

r? @rust-lang/rustdoc
2019-04-14 00:23:42 +02:00
Mazdak Farrokhzad
a52fce7ec8
Rollup merge of #59852 - alexcrichton:more-vectored, r=sfackler
std: Add `{read,write}_vectored` for more types

This commit implements the `{read,write}_vectored` methods on more types
in the standard library, namely:

* `std::fs::File`
* `std::process::ChildStd{in,out,err}`
* `std::io::Std{in,out,err}`
* `std::io::Std{in,out,err}Lock`
* `std::io::Std{in,out,err}Raw`

Where supported the OS implementations hook up to native support,
otherwise it falls back to the already-defaulted implementation.
2019-04-14 00:23:40 +02:00
Mazdak Farrokhzad
449697b7ff
Rollup merge of #59835 - lzutao:nonzero-signed, r=Mark-Simulacrum
Re-export NonZero signed variant in std

Closes  #59834 .
2019-04-14 00:23:39 +02:00
Mazdak Farrokhzad
715875268a
Rollup merge of #59830 - ehuss:keyword-links, r=Mark-Simulacrum
Fix links on keyword docs.

- Make links relative.
- Adjust links from old 2018-edition book.
- Fix broken link in `let` docs.
2019-04-14 00:23:37 +02:00
Mazdak Farrokhzad
8ad17ec6e4
Rollup merge of #59818 - crlf0710:eliminate_libstd_fnbox, r=cramertj
Eliminate `FnBox` usages from libstd.
2019-04-14 00:23:35 +02:00
Mazdak Farrokhzad
1888b55d7b
Rollup merge of #59804 - Zoxc:cleaner-jobserver, r=alexcrichton
Clean up jobserver integration

cc @alexcrichton
2019-04-14 00:23:34 +02:00
Mazdak Farrokhzad
37b76f29e7
Rollup merge of #59796 - oli-obk:const_arg_ice, r=eddyb
Retire `IsNotConst` naming

This naming scheme caused a lot of confusion lately (including ICEs) due to misrefactored code. Also clean up the initialization code for said flag.

r? @eddyb

previous discussions: https://github.com/rust-lang/rust/pull/58784#issuecomment-468717439 https://github.com/rust-lang/rust/pull/58403#discussion_r265936336
2019-04-14 00:23:32 +02:00
Mazdak Farrokhzad
d34ebb4660
Rollup merge of #59747 - gruberb:copy-book-toml-unstable-book, r=ehuss
Copy book.toml unstable book generator

Solves https://github.com/rust-lang/rust/issues/59554 and adds a book title to the unstable book.

I assume that [copy_recursive](acd8dd6a50/src/tools/unstable-book-gen/src/main.rs (L105)) will take files regardless of their type (`.md` or `.toml`).

Although I had a hard time time testing it. A second pair of eyes is definitely needed.
2019-04-14 00:23:30 +02:00
Mazdak Farrokhzad
056c02ec2f
Rollup merge of #59735 - matklad:deadcode, r=sanxiyn
remove lookup_char_pos_adj

It is now exactly equivalent to lookup_char_pos.
2019-04-14 00:23:29 +02:00
Mazdak Farrokhzad
d5030e2489
Rollup merge of #59708 - matthewjasper:double-closure-unused-mut, r=pnkfelix
Mark variables captured by reference as mutable correctly

Closes #59620

r? @pnkfelix
2019-04-14 00:23:27 +02:00
Mazdak Farrokhzad
bdb264ff5f
Rollup merge of #59675 - SimonSapin:stable-alloc, r=alexcrichton
Stabilize the `alloc` crate.

This implements RFC 2480:

* https://github.com/rust-lang/rfcs/pull/2480
* https://github.com/rust-lang/rfcs/blob/master/text/2480-liballoc.md

Closes https://github.com/rust-lang/rust/issues/27783
2019-04-14 00:23:25 +02:00
Chris Gregory
b754b8fb8e Expand note on mutable references 2019-04-13 15:54:57 -05:00
bors
e4c66afba5 Auto merge of #59612 - matthewjasper:dataflow-usual-newtype-index, r=estebank
Use normal newtype_index macro for MIR dataflows

* Makes the definition of these structs contain `struct IndexName`
* Avoids having an offset by removing high values, rather than 0
* Implements some traits for us.
2019-04-13 16:42:51 +00:00
bors
896c3a570f Auto merge of #59515 - wesleywiser:measureme, r=michaelwoerister
Use measureme in self profiler

r? @michaelwoerister

~Changes are still very rough.~

~I'm not sure what the right way to add the `measureme` dependency is. Currently it's just added with a relative path which Works On My Machine ™️.~

I'm also not sure what to do with the category data.
2019-04-13 11:54:26 +00:00
bors
aa35e73b25 Auto merge of #59922 - Centril:rollup-0qmx4jg, r=Centril
Rollup of 8 pull requests

Successful merges:

 - #59781 (Remove check_match from const_eval)
 - #59820 (proc_macro: stop using LEB128 for RPC.)
 - #59846 (clarify what the item is in "not a module" error)
 - #59847 (Error when using `catch` after `try`)
 - #59859 (Suggest removing `?` to resolve type errors.)
 - #59862 (Tweak unstable diagnostic output)
 - #59866 (Recover from missing semicolon based on the found token)
 - #59892 (Impl RawFd conversion traits for WASI TcpListener, TcpStream and UdpSocket)

Failed merges:

r? @ghost
2019-04-13 07:48:01 +00:00
Martin Pool
6225b312cf Make clear that format padding doesn't work for Debug
As mentioned in
https://github.com/rust-lang/rust/issues/46006#issuecomment-345260633
2019-04-13 15:39:49 +10:00
Wesley Wiser
56e434d84d Use measureme in self-profiler
Related to #58372
Related to #58967
2019-04-12 20:27:29 -04:00
Kornel
0a9b214b50 Exclude some copies of old book editions from search engines 2019-04-13 00:38:46 +01:00
bors
99da733f7f Auto merge of #59924 - Xanewok:subup, r=Xanewok
Update submodules (Clippy, RLS)

Basically https://github.com/rust-lang/rust/pull/59916 with one fix applied to make it build
2019-04-12 21:08:14 +00:00
Pietro Albini
4e920f2b04
ci: use a custom android sdk manager with pinning and mirroring 2019-04-12 22:18:48 +02:00
Esteban Küber
ca5a9ce2a1 Add test and fix dedup 2019-04-12 13:14:15 -07:00
Scott Olson
b27bcc0a17 Fix paste error in split_ascii_whitespace docs. 2019-04-12 13:57:45 -06:00
flip1995
0a5bc93f72 Update rls 2019-04-12 21:47:46 +02:00
flip1995
4a0aef4d1a Update Clippy 2019-04-12 21:27:15 +02:00
Mazdak Farrokhzad
ba173135be
Rollup merge of #59892 - rylev:as-raw-fd, r=alexcrichton
Impl RawFd conversion traits for WASI TcpListener, TcpStream and UdpSocket

r? @alexcrichton
2019-04-12 20:36:18 +02:00
Mazdak Farrokhzad
af4acd0533
Rollup merge of #59866 - estebank:recover-missing-semi, r=petrochenkov
Recover from missing semicolon based on the found token

When encountering one of a few keywords when a semicolon was
expected, suggest the semicolon and recover:

```
error: expected one of `.`, `;`, `?`, or an operator, found `let`
  --> $DIR/recover-missing-semi.rs:4:5
   |
LL |     let _: usize = ()
   |                      - help: missing semicolon here
LL |
LL |     let _ = 3;
   |     ^^^

error[E0308]: mismatched types
  --> $DIR/recover-missing-semi.rs:2:20
   |
LL |     let _: usize = ()
   |                    ^^ expected usize, found ()
   |
   = note: expected type `usize`
              found type `()`
```
2019-04-12 20:36:16 +02:00
Mazdak Farrokhzad
ca9f04e41e
Rollup merge of #59862 - estebank:tweak-unstable-diag, r=petrochenkov
Tweak unstable diagnostic output
2019-04-12 20:36:15 +02:00
Mazdak Farrokhzad
2bc127dcc7
Rollup merge of #59859 - davidtwco:issue-59756, r=cramertj
Suggest removing `?` to resolve type errors.

Fixes #59756.
2019-04-12 20:36:13 +02:00
Mazdak Farrokhzad
8f111951a1
Rollup merge of #59847 - Kampfkarren:try-block-catch, r=estebank
Error when using `catch` after `try`

Part of https://github.com/rust-lang/rust/issues/31436
2019-04-12 20:36:11 +02:00
Mazdak Farrokhzad
29f9dd2364
Rollup merge of #59846 - euclio:not-a-module, r=davidtwco
clarify what the item is in "not a module" error

The motivation here was that I was trying to import an associated constant when I thought it was an enum variant, and got confused by this error.

Ideally I would like to add a note saying that associated constants, types, and methods cannot be imported, but I'm not sure that the associated items for a `Def` can be checked at resolve time.
2019-04-12 20:36:09 +02:00
Mazdak Farrokhzad
ed1dd1eb74
Rollup merge of #59820 - eddyb:proc-macro-rpc-opt, r=nnethercote
proc_macro: stop using LEB128 for RPC.

I'm not sure how much of an improvement this creates, it's pretty tricky to measure.
2019-04-12 20:36:07 +02:00
Mazdak Farrokhzad
1fb4837bb6
Rollup merge of #59781 - whitfin:issue-59378, r=oli-obk
Remove check_match from const_eval

This fixes #59378.

It seems that the `check_match` may be unnecessary, so this removes it per instructions provided in the issue. I re-ran the tests for `librustc_mir` and everything seemed fine!
2019-04-12 20:36:05 +02:00
Simon Sapin
fc928a18ba Stabilize the alloc crate.
This implements RFC 2480:

* https://github.com/rust-lang/rfcs/pull/2480
* https://github.com/rust-lang/rfcs/blob/master/text/2480-liballoc.md

Closes https://github.com/rust-lang/rust/issues/27783
2019-04-12 20:07:30 +02:00
Guillaume Gomez
4f28431e39 Apply resource-suffix to search-index and source-files scripts as well 2019-04-12 19:30:37 +02:00
bors
df25d79a33 Auto merge of #59733 - cramertj:wake-by-ref, r=withoutboats
Final (one can only hope) futures_api adjustments

Based on https://github.com/rust-lang/rust/pull/59119 -- this change is only the latter two commits.
cc https://github.com/rust-lang/rust/issues/59725

r? @withoutboats
2019-04-12 17:24:01 +00:00
Guillaume Gomez
796e6e37d6 Don't generate empty json variables 2019-04-12 19:17:46 +02:00
rchaser53
d01ac0d61e add the logic for when other_ty is FnDef 2019-04-12 23:57:06 +09:00
bors
9a612b2348 Auto merge of #59651 - tmandry:discr-index, r=eddyb
Add discr_index to multi-variant layouts

We remove the assumption that the discriminant is always field 0, in
preparations for layouts like generators where this is not (always) going to be
the case.

Specifically, upvars are going to go before the discriminant. In theory, it's possible to remove _that_ assumption instead and keep the discriminant at field index 0, but one assumption or the other had to go :)

There is one place I know of in the debuginfo code where we'll still need to remove assumptions that the discriminant is the _only_ field. I was planning on doing this along with the upcoming generator change, which will also include tests that exercise the code changing in this PR.

r? @eddyb
cc @oli-obk
cc @cramertj
2019-04-12 14:38:15 +00:00
Andrew Xu
98beb12706 Add a link to the licenses page 2019-04-12 22:14:21 +08:00