Commit Graph

95262 Commits

Author SHA1 Message Date
bors
4a365a29d6 Auto merge of #61020 - HeroicKatora:master, r=matthewjasper
librustc_data_structures: Speedup union of sparse and dense hybrid set

This optimization speeds up the union of a hybrid bitset when that
switches it from a sparse representation to a dense bitset. It now
clones the dense bitset and integrate only the spare elements instead of
densifying the sparse bitset, initializing all elements, and then a
union on two dense bitset, touching all words a second time.

It's not completely certain if the added complexity is worth it but I would
like to hear some feedback in any case. Benchmark results from my machine:

```
Now:  bit_set::union_hybrid_sparse_to_dense ... bench:          72 ns/iter (+/- 5)
Previous: bit_set::union_hybrid_sparse_to_dense ... bench:          90 ns/iter (+/- 6)
```

This being the second iteration of trying to improve the speed, since I missed the return value in the first, and forgot to run the relevant tests. Oops.
2019-06-22 15:12:15 +00:00
Mazdak Farrokhzad
e994d35e9b Lint empty 'derive()' as unused attribute. 2019-06-22 13:19:55 +02:00
CrLF0710
9a08e168bd
Fix one missing dyn.
It's in the documentation of `Unsize`.
2019-06-22 18:35:43 +08:00
bors
d4d5d67c1c Auto merge of #62024 - RalfJung:miri, r=oli-obk
update miri

r? @oli-obk
2019-06-22 10:31:43 +00:00
Ralf Jung
a1e954e82d update miri 2019-06-22 12:30:05 +02:00
Mazdak Farrokhzad
af710c9e79 Add test for linting on 'cfg_attr(,)'. 2019-06-22 12:12:26 +02:00
Mazdak Farrokhzad
02877ac09b Lint on 'cfg_attr(,).' 2019-06-22 12:11:01 +02:00
bors
305930cffe Auto merge of #62010 - ecstatic-morse:kill-borrows-of-proj, r=pnkfelix
Kill conflicting borrows of places with projections.

Resolves #62007.

Due to a bug, the previous version of this check did not actually kill all conflicting borrows unless the borrowed place had no projections. Specifically, `sets.on_entry` will always be empty when `statement_effect` is called. It does not contain the set of borrows which are live at this point in the program.

@pnkfelix describes why this was not caught before in #62007, and created an example where the current borrow checker failed unnecessarily. This PR adds their example as a test, but they will likely want to add some additional ones.

r? @pnkfelix
2019-06-22 05:12:11 +00:00
bors
e562b24ae3 Auto merge of #62041 - Centril:rollup-95eeyx7, r=Centril
Rollup of 9 pull requests

Successful merges:

 - #60971 (Add DocFS layer to rustdoc)
 - #61146 (SliceConcatExt::connect defaults to calling join)
 - #61181 (Fix theme-checker failure)
 - #61267 (rustc-book: Update the rustc/clang compatibility table for xLTO.)
 - #61270 (Remove warnings about incr. comp. generating less debugging output.)
 - #61681 (Changed the error message to more clearly explain what is allowed)
 - #61984 (More NodeId pruning)
 - #62016 (Add test for issue-27697)
 - #62019 (Remove needless lifetimes)

Failed merges:

r? @ghost
2019-06-22 02:16:53 +00:00
Mazdak Farrokhzad
64e5818307
Rollup merge of #62019 - jeremystucki:refactoring, r=estebank
Remove needless lifetimes
2019-06-22 01:42:41 +02:00
Mazdak Farrokhzad
595f55cb8b
Rollup merge of #62016 - JohnTitor:add-test-for-issue-27697, r=alexcrichton
Add test for issue-27697

Closes #27697
2019-06-22 01:42:40 +02:00
Mazdak Farrokhzad
dc0ef823be
Rollup merge of #61984 - ljedrz:more_node_id_pruning, r=Zoxc
More NodeId pruning

Just another round of the `HirId`ification initiative.

r? @Zoxc
2019-06-22 01:42:38 +02:00
Mazdak Farrokhzad
9eb88f3b82
Rollup merge of #61681 - asfreitas:addSendTrait, r=estebank
Changed the error message to more clearly explain what is allowed

This is in regard to #61634. I changed the language to make it more clear what is allowed.
2019-06-22 01:42:37 +02:00
Mazdak Farrokhzad
c3c3a5e7e7
Rollup merge of #61270 - michaelwoerister:remove-incr-comp-warning, r=oli-obk
Remove warnings about incr. comp. generating less debugging output.

This PR removes the

> `-C save-temps` might not produce all requested temporary products when incremental compilation is enabled.`

warning and others similar to it.

I think these warnings have annoyed lots of people over the past ~3 years; while not helping a single one of them `:P`

r? @oli-obk
2019-06-22 01:42:35 +02:00
Mazdak Farrokhzad
653b44dbf7
Rollup merge of #61267 - michaelwoerister:update-xlto-table, r=alexcrichton
rustc-book: Update the rustc/clang compatibility table for xLTO.

Firefox is using these combinations successfully.
2019-06-22 01:42:33 +02:00
Mazdak Farrokhzad
18bb75477a
Rollup merge of #61181 - GuillaumeGomez:fix-theme-checker, r=kinnison
Fix theme-checker failure

Fixes #61145.

I didn't find a way to check it without strongly depending on the output... Is there a way to check if a program fails without checking its output?

r? @QuietMisdreavus
2019-06-22 01:42:31 +02:00
Mazdak Farrokhzad
3a8536edef
Rollup merge of #61146 - czipperz:SliceConcatExt-connect-default-to-join, r=sfackler
SliceConcatExt::connect defaults to calling join

It makes sense to default a deprecated method to the new one.  Precedence example is `Error::cause` defaults to calling `Error::source`.
2019-06-22 01:42:30 +02:00
Mazdak Farrokhzad
f2a0ce9c37
Rollup merge of #60971 - rbtcollins:docs-perf, r=rbtcollins,GuillaumeGomez
Add DocFS layer to rustdoc

* Move fs::create_dir_all calls into DocFS to provide a clean
  extension point if async extension there is needed.
* Convert callsites of create_dir_all to ensure_dir to reduce syscalls.
* Convert fs::write usage to DocFS.write
  (which also removes a lot of try_err! usage for easier reading)
* Convert File::create calls to use Vec buffers and then DocFS.write
  in order to both consistently reduce syscalls as well as make
  deferring to threads cleaner.
* Convert OpenOptions usage similarly - I could find no discussion on
  the use of create_new for that one output file vs all the other
  files render creates, if link redirection attacks are a concern
  DocFS will provide a good central point to introduce systematic
  create_new usage.
* DocFS::write defers to rayon for IO on Windows producing a modest
  speedup: before this patch on my development workstation:

$ time cargo +mystg1 doc -p winapi:0.3.7
 Documenting winapi v0.3.7
    Finished dev [unoptimized + debuginfo] target(s) in 6m 11s

real    6m11.734s
user    0m0.015s
sys     0m0.000s

Afterwards:
$ time cargo +mystg1 doc -p winapi:0.3.7
   Compiling winapi v0.3.7
 Documenting winapi v0.3.7
    Finished dev [unoptimized + debuginfo] target(s) in 49.53s

real    0m49.643s
user    0m0.000s
sys     0m0.015s

I haven't measured how much time is in the compilation logic vs in the
IO and outputting etc, but this takes it from frustating to tolerable
for me, at least for now.
2019-06-22 01:42:28 +02:00
bors
8d6f4b96df Auto merge of #62018 - Zoxc:vs2019, r=alexcrichton
Update LLVM to fix VS 2019 compilation

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

r? @alexcrichton
2019-06-21 23:28:13 +00:00
Felix Rabe
eceeedc7b0
Typo 2019-06-22 00:44:31 +02:00
bors
929b48ec98 Auto merge of #62027 - lzutao:clippy-update, r=oli-obk
submodules: Update clippy from 149a988 to 5a11ed7b

r? @oli-obk
2019-06-21 16:26:14 +00:00
Andrew
f4cd3c2054 adding in these files that didn't get added in previous commit 2019-06-22 00:18:15 +08:00
John Wrenn
ac98342e84 Implement arbitrary_enum_discriminant 2019-06-21 11:00:10 -04:00
Andrew
54acbd96f9 changed expected output in tests so it now passes with changed output 2019-06-21 22:12:07 +08:00
Marc-Antoine Perennou
870f13a0b3 rustbuild: only autodetect cxx for hosts
Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
2019-06-21 14:02:05 +02:00
Lzu Tao
dfd430e0a5 submodules: Update clippy from 149a988 to 5a11ed7b 2019-06-21 11:54:50 +00:00
Wesley Wiser
c686130a38 Fix nits 2019-06-21 07:46:27 -04:00
Felix S. Klock II
f483269625 Add test checking our behavior for assigning over a ConstIndex projection. 2019-06-21 13:08:15 +02:00
Felix S. Klock II
3b8ef01030 Add test that our handling of projections hasn't gone too far:
overwriting one field should not allow reborrow of an unrelated field.
2019-06-21 12:52:54 +02:00
Felix S. Klock II
241ceeda04 Added test for deref projection. 2019-06-21 12:43:55 +02:00
Felix S. Klock II
681af62ba4 add comment outlining test. 2019-06-21 12:43:51 +02:00
Felix S. Klock II
e78361a16c rename file because I found the old filename too long and unwieldy. 2019-06-21 12:43:46 +02:00
bors
38cd9489f7 Auto merge of #61959 - oli-obk:const_field_ice, r=eddyb
Fix a hash collision issue on the `const_field` query

fixes #61530
2019-06-21 10:16:14 +00:00
Guillaume Gomez
65f12950b6 Better handling of the sender channel part in rustdoc file writing 2019-06-21 12:00:49 +02:00
Guillaume Gomez
3eeb543504 Handle fs errors through errors::Handler instead of eprintln and panic 2019-06-21 12:00:49 +02:00
Robert Collins
6392bc9fcd Add DocFS layer to rustdoc
* Move fs::create_dir_all calls into DocFS to provide a clean
  extension point if async extension there is needed.
* Convert callsites of create_dir_all to ensure_dir to reduce syscalls.
* Convert fs::write usage to DocFS.write
  (which also removes a lot of try_err! usage for easier reading)
* Convert File::create calls to use Vec buffers and then DocFS.write
  in order to consistently reduce syscalls as well, make
  deferring to threads cleaner and avoid leaving dangling content if
  writing to existing files....
* Convert OpenOptions usage similarly - I could find no discussion on
  the use of create_new for that one output file vs all the other
  files render creates, if link redirection attacks are a concern
  DocFS will provide a good central point to introduce systematic
  create_new usage. (fs::write/File::create is vulnerable to link
  redirection attacks).
* DocFS::write defers to rayon for IO on Windows producing a modest
  speedup: before this patch on my development workstation:

$ time cargo +mystg1 doc -p winapi:0.3.7
 Documenting winapi v0.3.7
    Finished dev [unoptimized + debuginfo] target(s) in 6m 11s

real    6m11.734s

Afterwards:
$ time cargo +mystg1 doc -p winapi:0.3.7
   Compiling winapi v0.3.7
 Documenting winapi v0.3.7
    Finished dev [unoptimized + debuginfo] target(s) in 49.53s

real    0m49.643s

I haven't measured how much time is in the compilation logic vs in the
IO and outputting etc, but this takes it from frustating to tolerable
for me, at least for now.
2019-06-21 12:00:49 +02:00
Jeremy Stucki
004efa2705
Remove needless lifetimes 2019-06-21 11:39:28 +02:00
Michael Woerister
0d67510a48 Remove warnings about incr. comp. generating less debugging output. 2019-06-21 10:07:59 +02:00
Oliver Scherer
d46a373b39 Further reduce the likelyhood of hash collisions 2019-06-21 09:56:02 +02:00
Oliver Scherer
0102942e8c Documentation typo 2019-06-21 09:54:11 +02:00
ljedrz
0a511cce79 revert the NodeId to HirId parameter change to get_path_res 2019-06-21 08:57:34 +02:00
bors
56a12b2ad0 Auto merge of #62003 - christianpoveda:master, r=oli-obk
Replace MemoryExtra by Memory in intptrcast methods

r? @RalfJung @oli-obk
2019-06-21 06:37:17 +00:00
John Kåre Alsaker
6b86302db3 Update LLVM to fix VS 2019 compilation 2019-06-21 08:31:41 +02:00
Yuki Okushi
b4c73a297c Add test for issue-27697 2019-06-21 15:18:00 +09:00
bors
dbec74ffa7 Auto merge of #61948 - ehuss:update-mdbook, r=steveklabnik
Update mdbook

This updates to mdbook 0.3.0. This release includes the following changes:
https://github.com/rust-lang-nursery/mdBook/blob/master/CHANGELOG.md#mdbook-030
One of the biggest changes is the update to pulldown-cmark.

This also bumps the submodules (except the nomicon which has some broken links).

## reference

6 commits in f8ae436d936f6f4891d3c1bbb1af5865eb8aeadb..08ae27a4921ca53967656a7391c82f6c0ddd1ccc
2019-05-31 14:59:12 +0200 to 2019-06-17 11:24:13 -0700
- Document `underscore_const_names` (rust-lang-nursery/reference#620)
- Describe `#[repr(align(x))]` semantics on `enum`s (rust-lang-nursery/reference#619)
- Fix typo in lazy_static example. (rust-lang-nursery/reference#622)
- Rust 2015 supports Kleene ? macro operator (rust-lang-nursery/reference#617)
- Bitrig support has been removed (rust-lang-nursery/reference#615)
- Fix spell error in attributes/diagnostics.md (rust-lang-nursery/reference#614)

## book

8 commits in 62a8c6f25fbd981c80a046f3b04be9684749af3b..9aacfcc4c5b102c8cda195932addefd32fe955d2
2019-05-28 15:48:23 -0400 to 2019-06-16 21:27:26 -0400
- Add a script to help diff rendered books
- Update mdbook links (rust-lang/book#1989)
- Update for markdown changes. (rust-lang/book#1984)
- Make all mentions of crates.io consistent
- Propagate corrections made in layout
- Add link to Swedish translation
- Propagate small edits made in layout
- Remove snapshot files that have been checked with layout

## rust-by-example

3 commits in d8eec1dd65470b9a68e80ac1cba8fad0daac4916..b27472962986e85c94f4183b1a6d2207660d3ed6
2019-06-08 10:15:22 -0300 to 2019-06-17 15:52:07 -0300
- Update `macro_rules!` formatting. (rust-lang/rust-by-example#1205)
- Add Cargo comment to the `try!` macro example. (rust-lang/rust-by-example#1203)
- Fix typo (rust-lang/rust-by-example#1204)

## rustc-guide

15 commits in 3ac9cfc9c9ab2e366feebf18718112737f572352..f55e97c145cf37fd664db2e0e2f2d05df328bf4f
2019-06-02 19:36:58 -0500 to 2019-06-15 17:29:12 -0500
- fix typos
- Update for TyCtxt&lt;'a, 'gcx, 'tcx&gt; -&gt; TyCtxt&lt;'tcx&gt;.
- fix ci failures, typos, broken links
- Some edits to address review comments
- Notes about closure de-sugaring
- add note about rebuilding llvm
- Changes to config.toml require a clean
- Fix a few typos in type inference chapter
- Add triagebot (rust-lang/rustc-guide#337)
- Update how-to-build-and-run.md
- Update how-to-build-and-run.md
- Update compiler-debugging.md
- use debug instead of debuginfo-level
- Replaced tabs with spaces
- correct indentation

## edition-guide

4 commits in 581c6cccfaf995394ea9dcac362dc8e731c18558..f8072acde5ce29c7570d7986180bbded2d22e287
2019-05-06 12:47:44 -0700 to 2019-06-14 23:27:05 +0200
- Small fixes (rust-lang-nursery/edition-guide#179)
- Cleanup unused NLL link (rust-lang-nursery/edition-guide#167)
- Part 2: Rust 2015 now supports ? macro rep op (rust-lang-nursery/edition-guide#163)
- Part 1: Rust 2015 now supports ? macro rep op (rust-lang-nursery/edition-guide#162)

## embedded-book

1 commits in f0c75b75f9c18537b78f5d17c1015247e9a49c86..ef27b517dcd0b990c888c0d7caeff52a5a115619
2019-06-03 10:49:02 +0000 to 2019-06-18 22:59:47 +0000
- Fix link for more strict commonmark interpretation.  (rust-embedded/book#194)
2019-06-21 03:24:56 +00:00
Eric Huss
2dafa91310 Update mdbook 2019-06-20 19:47:44 -07:00
Wesley Wiser
164ed087ab [const-prop] Move local storage into a Frame on InterpCx
This moves us closer to just using `InterpCx` for interpretation.
2019-06-20 21:12:10 -04:00
Wesley Wiser
573b61ae26 [const-prop] Introduce getter/setter functions 2019-06-20 21:12:10 -04:00
bors
9d5b6efdf6 Auto merge of #60293 - nagisa:rustdoc-all-the-auto-traits, r=eddyb
rustdoc: generate implementors for all auto traits

Previously we would only generate a list of synthetic implementations
for two well known traits – Send and Sync. With this patch all the auto
traits known to rustc are considered. This includes such traits like
Unpin and user’s own traits.

Sadly the implementation still iterates through the list of crate items
and checks them against the traits, which for non-std crates containing
their own auto-traits will still not include types defined in std/core.

It is an improvement nontheless.
2019-06-20 23:44:52 +00:00
Dylan MacKenzie
f045008f94 Kill conflicting borrows of places with projections.
Resolves #62007.

Due to a bug, the previous version of this check did not actually kill
any conflicting borrows unless the borrowed place had no projections.
Specifically, `entry_set` will always be empty when `statement_effect`
is called. It does not contain the set of borrows which are live at this
point in the program.
2019-06-20 16:30:43 -07:00