Commit Graph

105750 Commits

Author SHA1 Message Date
Konrad Borowski
a70b240189 Make iter::Empty<T> implement Send and Sync for any T 2020-01-18 18:50:10 +01:00
Mazdak Farrokhzad
0aebb08115 slice_patterns: adjust error codes 2020-01-18 17:59:44 +01:00
Mazdak Farrokhzad
c41443a2b7 stabilize slice_patterns 2020-01-18 17:59:44 +01:00
bors
779f85bac6 Auto merge of #68001 - Marwes:lexical_region_resolve, r=nikomatsakis
perf: Only search potentially changed constraints in lexical_region_resolve

Gives a big performance increase to the unicode_normalization benchmark in my testing.
2020-01-18 14:57:40 +00:00
Guillaume Gomez
9746b05da9 clean up e0200 explanation 2020-01-18 15:06:02 +01:00
lcnr/Bastian Kauschke
6b7f3e50df improve type_name_of_val docs 2020-01-18 14:43:08 +01:00
Mara Bos
366f619a49 Fix table of syscalls in docs of std::time::SystemTime. 2020-01-18 13:42:31 +01:00
Mara Bos
af6282f92a Fix table of syscalls in docs of std::time::Instant. 2020-01-18 13:41:35 +01:00
msizanoen1
45dd44c0e1
Add riscv64gc-unknown-linux-gnu into target list in build-manifest
Missed in #68037 

r? @alexcrichton
2020-01-18 18:59:51 +07:00
bors
35b5157db5 Auto merge of #68170 - wesleywiser:stop_const_prop_ref_taking, r=oli-obk
Turn off const propagation of ref taking

Fixes #67529
Fixes #67640
Fixes #67641
Fixes #67862

r? @oli-obk
2020-01-18 11:36:47 +00:00
Ralf Jung
6106758fce adjust ui tests 2020-01-18 12:24:54 +01:00
Ralf Jung
ec063a0ae8 adjust mir-opt tests 2020-01-18 11:15:56 +01:00
Ralf Jung
79359315d6 get rid of real_drop_in_place again 2020-01-18 11:15:56 +01:00
bors
1b117d7546 Auto merge of #68037 - msizanoen1:riscv-ci, r=alexcrichton
Distribution CI for riscv64gc-unknown-linux-gnu

This modifies `dist-various-1` to build the standard library for RISC-V GNU/Linux.

r? @alexcrichton
2020-01-18 08:18:44 +00:00
bors
fb4ac14c5e Auto merge of #67940 - JohnTitor:rustc-guide, r=JohnTitor
Update rustc-guide

r? @ghost

CC: @rust-lang/wg-learning
2020-01-18 04:45:21 +00:00
bors
8c28fe89c7 Auto merge of #68330 - tmandry:rollup-5v29y9r, r=tmandry
Rollup of 9 pull requests

Successful merges:

 - #66660 (Don't warn about snake case for field puns.)
 - #68093 (Fix deref impl typedef)
 - #68204 (Use named fields for `{ast,hir}::ItemKind::Impl`)
 - #68256 (Do not ICE on malformed suggestion spans)
 - #68279 (Clean up E0198 explanation)
 - #68291 (Update sanitizer tests)
 - #68312 (Add regression test for integer literals in generic arguments in where clauses)
 - #68314 (Stop treating `FalseEdges` and `FalseUnwind` as having semantic value for const eval)
 - #68317 (Clean up E0199 explanation)

Failed merges:

r? @ghost
2020-01-18 01:29:28 +00:00
Tyler Mandry
14d779c3f0
Rollup merge of #68317 - GuillaumeGomez:clean-up-e0199, r=Dylan-DPC
Clean up E0199 explanation

r? @Dylan-DPC
2020-01-17 17:28:23 -08:00
Tyler Mandry
dd6a83875e
Rollup merge of #68314 - oli-obk:true_unwind, r=eddyb
Stop treating `FalseEdges` and `FalseUnwind` as having semantic value for const eval

This change does not expose loops or conditions to stable const fns because we check those at the HIR level and in the regular const validity checks.

cc @ecstatic-morse

r? @eddyb
2020-01-17 17:28:22 -08:00
Tyler Mandry
9d9c8c69e3
Rollup merge of #68312 - varkor:issue-67753-regression, r=Centril
Add regression test for integer literals in generic arguments in where clauses

Closes https://github.com/rust-lang/rust/issues/67753.
2020-01-17 17:28:20 -08:00
Tyler Mandry
87293cd3d8
Rollup merge of #68291 - tmiasko:sanitizer-tests, r=nikomatsakis
Update sanitizer tests

* Move tests from src/test/run-make-fulldeps to src/test/ui.
* Fix memory sanitizer test to detect the intended issue rather than
  an unrelated one caused by the use of an uninstrumented std.
2020-01-17 17:28:18 -08:00
Tyler Mandry
2a1ab29806
Rollup merge of #68279 - GuillaumeGomez:clean-up-e0198, r=Dylan-DPC
Clean up E0198 explanation

r? @Dylan-DPC
2020-01-17 17:28:17 -08:00
Tyler Mandry
7f6fdef0e9
Rollup merge of #68256 - estebank:bad-sugg-span, r=petrochenkov
Do not ICE on malformed suggestion spans

Under the assumption that suggestions are by their very nature always "best effort", it is ok if we don't display them instead of having an ICE. The underlying issue of the malformed span being _created_ is left unaddressed.

Fix #67567.

r? @petrochenkov
2020-01-17 17:28:15 -08:00
Tyler Mandry
fca3264406
Rollup merge of #68204 - ecstatic-morse:item-kind-impl, r=oli-obk
Use named fields for `{ast,hir}::ItemKind::Impl`

Currently, the widely used `ItemKind::Impl` variant is a tuple with seven fields. I want to add an eighth in #68140, which means I have to update most matches on this variant anyways. Giving a name to each field improves readability and makes future changes of this nature much simpler.

This change will cause several tools to break. I will fix them once this is merged.
2020-01-17 17:28:14 -08:00
Tyler Mandry
bafe089d1f
Rollup merge of #68093 - GuillaumeGomez:fix-deref-impl-typedef, r=oli-obk
Fix deref impl typedef

Fixes #35295.

r? @kinnison
2020-01-17 17:28:12 -08:00
Tyler Mandry
c854aecd62
Rollup merge of #66660 - jumbatm:dont_warn_about_snake_case_in_patterns, r=centril
Don't warn about snake case for field puns.

Closes #66362.
2020-01-17 17:28:10 -08:00
Dylan MacKenzie
4743995ed3 Use named fields for hir::ItemKind::Impl 2020-01-17 16:14:29 -08:00
Jethro Beekman
766f6c5d0a Actually pass target LLVM args to LLVM 2020-01-17 16:11:52 -08:00
Dylan MacKenzie
d461e6d6cb Use named fields for ast::ItemKind::Impl 2020-01-17 15:59:07 -08:00
Vita Batrla
239a7d9124 refactor fix using cfg_if! (fix build) 2020-01-18 00:47:20 +01:00
Oliver Middleton
79061d0e02 rustdoc: Catch fatal errors when syntax highlighting
For some errors the lexer will unwind so we need to handle that in addition to handling `token::Unknown`.
2020-01-17 23:44:44 +00:00
Vita Batrla
dda32e4e53 refactor fix using cfg_if! 2020-01-17 22:46:32 +01:00
bors
d8dcb6345b Auto merge of #67476 - mark-i-m:simplify-borrow_check-5, r=matthewjasper
Region naming refactoring [6/N]

Followup to #67474

EDIT: this PR is probably best read commit-by-commit...

The major changes in this PR include:
- moving many functions around to modules that better suit them. In particular, a lot of methods were moved from `borrow_check::diagnostics::region_errors` to `borrow_check::region_infer`, and `report_region_errors` was moved from `borrow_check` to `borrow_check::diagnostics::region_errors`.
- `borrow_check::diagnostics::{region_errors, region_name}` are now most comprised of methods on `MirBorrowckCtxt` instead of `RegionInferenceContext`, allowing us to get rid of the annoying `pub(in crate::borrow_check)` on most of the fields of the latter, along with a number of method arguments on many methods.
- I renamed `MirBorrowckCtxt.nonlexical_regioncx` to just `regioncx` because their is no lexical lifetimes any more, and the old name was annoyingly verbose, causing many lines to wrap unnecessarily.
- I got rid of `ErrorRegionNamingContext`. Region naming is implemented as inherent methods on `MirBorrowckCtxt`, so we just move the naming stuff into that struct.

The PR is rather large, but the commits are fairly self-contained (though they don't all compile). There was one minor output change to one test with `compare-mode=nll`, which I think is acceptable.

Between this PR and the last one, a net of 200 lines are removed, most of which was function parameters and context structs 🎉

Some samples:

```diff
-                        self.nonlexical_regioncx.free_region_constraint_info(
-                            &self.body,
-                            &self.local_names,
-                            &self.upvars,
-                            self.mir_def_id,
-                            self.infcx,
-                            borrow_region_vid,
-                            region,
-                        );
+                        self.free_region_constraint_info(borrow_region_vid, region);
```

```diff
-            .or_else(|| {
-                self.give_name_if_anonymous_region_appears_in_yield_ty(
-                    infcx,
-                    body,
-                    *mir_def_id,
-                    fr,
-                    renctx,
-                )
-            });
+            .or_else(|| self.give_name_if_anonymous_region_appears_in_arguments(fr))
```

r? @matthewjasper

cc @eddyb
2020-01-17 21:43:23 +00:00
Vadim Petrochenkov
8fa8b81a77 Fix some tests failing in --pass check mode 2020-01-18 00:38:17 +03:00
Guillaume Gomez
e8a4b9319c Clean up E0199 explanation 2020-01-17 19:54:07 +01:00
Guillaume Gomez
482dc77dee formatting 2020-01-17 19:51:07 +01:00
Guillaume Gomez
298e8ad5dc Extend url in heading test a bit 2020-01-17 19:49:03 +01:00
Guillaume Gomez
9c6c2f16f0 Clean up E0198 explanation 2020-01-17 19:47:48 +01:00
varkor
a91f77ca26 Add regression test for integer literals in generic arguments in where clauses 2020-01-17 16:09:22 +00:00
Oliver Scherer
cdc828e7f9 Stop treating FalseEdges and FalseUnwind as having semantic value for const eval 2020-01-17 17:09:05 +01:00
bors
689fca01c5 Auto merge of #68311 - Dylan-DPC:rollup-wzgqw9t, r=Dylan-DPC
Rollup of 4 pull requests

Successful merges:

 - #66564 (Document unsafe blocks in core::{cell, str, sync})
 - #67791 (Implement Lift using interners instead of in_arena)
 - #68278 ([self-profiler] Add example to `-Z help` to turn on query key recording)
 - #68300 (Allow added string.insert benchmarks to compile)

Failed merges:

r? @ghost
2020-01-17 15:58:24 +00:00
Vita Batrla
34878d7b05 Options IP_MULTICAST_TTL and IP_MULTICAST_LOOP are 1 byte on BSD and Solaris
See ip(4P) man page:
 IP_MULTICAST_TTL     Time  to live for multicast datagrams. This option
                      takes an unsigned character as  an  argument.  Its
                      value  is  the TTL that IP uses on outgoing multi-
                      cast datagrams. The default is 1.

 IP_MULTICAST_LOOP    Loopback for multicast datagrams. Normally  multi-
                      cast  datagrams  are  delivered  to members on the
                      sending  host  (or  sending  zone).  Setting   the
                      unsigned  character argument to 0 causes the oppo-
                      site behavior, meaning that  when  multiple  zones
                      are  present,  the  datagrams are delivered to all
                      zones except the sending zone.

https://docs.oracle.com/cd/E88353_01/html/E37851/ip-4p.html
https://man.openbsd.org/ip.4
2020-01-17 16:01:42 +01:00
Dylan DPC
87a2896b0a
Rollup merge of #68300 - ssomers:67281_take_2, r=Dylan-DPC
Allow added string.insert benchmarks to compile

Allow the code added by #67281 to compile.

(symptons listed [in internals forum](https://internals.rust-lang.org/t/x-py-how-to-benchmark-liballoc/11635))
r? @llogiq
2020-01-17 18:53:44 +05:30
Dylan DPC
ed0e11a3cb
Rollup merge of #68278 - wesleywiser:doc_query_key_recording, r=michaelwoerister
[self-profiler] Add example to `-Z help` to turn on query key recording

Also add the `default` option so that it's easy to add query key
recording to the default.

r? @michaelwoerister
2020-01-17 18:53:42 +05:30
Dylan DPC
8c016c3c36
Rollup merge of #67791 - Zoxc:lift-interning, r=eddyb
Implement Lift using interners instead of in_arena

r? @eddyb
cc @cjgillot
2020-01-17 18:53:41 +05:30
Dylan DPC
d3589aa4ed
Rollup merge of #66564 - foeb:66219-document-unsafe-sync-cell-str, r=Amanieu
Document unsafe blocks in core::{cell, str, sync}

Split from #66506 (issue #66219). Hopefully doing a chunk at a time is more manageable!

r? @RalfJung
2020-01-17 18:53:38 +05:30
Aaron Hill
3fef3d8b76
Add @weiznich's regression test 2020-01-17 08:22:40 -05:00
Aaron Hill
c431cd751f
Fix typo
Co-Authored-By: Oliver Scherer <github35764891676564198441@oli-obk.de>
2020-01-17 08:13:04 -05:00
Markus Westerlind
917eb18790 perf: Only search the potentially changed constraints in lexical_region_resolve 2020-01-17 13:43:41 +01:00
Markus Westerlind
343eee6082 perf: Filter out and process fixed constraints first in region expansion
Should reduce the number of elements as well as branches in the
extremely hot loop and process_constraint in benchmarks such as
unicode_normalization
2020-01-17 13:43:13 +01:00
bors
71c6346aa1 Auto merge of #68285 - oli-obk:specialization_regression, r=davidtwco
Array repeat expression lengths must be monomorphic at MIR building time

fixes #67743
2020-01-17 12:25:07 +00:00