97019 Commits

Author SHA1 Message Date
Mazdak Farrokhzad
c2b066c560
Rollup merge of - GuillaumeGomez:update-minifier, r=GuillaumeGomez
Update minifier-rs version

The `main.js` file size goes from 52868 to 50134. A few fixes have been included as well (no more eluded parts of js files).

r? @QuietMisdreavus
2019-07-28 21:19:54 +02:00
Mazdak Farrokhzad
fbfd542277
Rollup merge of - Aaron1011:patch-2, r=RalfJung
Document that ManuallyDrop::drop should not called more than once

Double dropping is unsound (e.g. https://github.com/rust-lang/rust/issues/60977). This commit documents the fact that `ManuallyDrop::drop` should not be called multiple times on the same instance, as it might not be immediately obvious that this counts as a use of uninitialized data.
2019-07-28 21:19:52 +02:00
Mazdak Farrokhzad
a4cd2ecab2
Rollup merge of - c410-f3r:attrs-fn, r=matthewjasper
Lint attributes on function arguments

Fixes .

cc 
2019-07-28 21:19:50 +02:00
Mazdak Farrokhzad
56b39fba56 Add 'span_to_snippet' shortcut. 2019-07-28 20:43:09 +02:00
Mazdak Farrokhzad
1b118607ec Use chaining for diagnosics in parser. 2019-07-28 20:43:09 +02:00
Mazdak Farrokhzad
dfad725be5 Recover 'for ( $pat in $expr ) $block'. 2019-07-28 20:43:09 +02:00
Guillaume Gomez
3f4dbd390c Update minifier-rs version 2019-07-28 20:26:07 +02:00
David Tolnay
6fd6972e8b
Remove anonymous_parameters from unrelated test 2019-07-28 10:17:36 -07:00
Baoshan Pang
173cbf1134 bypass x86stdcall.rs for vxworks
ignore wait-forked-but-failed-child.rs as there is no command 'ps' on vxWorks

ignore process-sigpipe.rs as there is no 'sh' on vxWorks

ignore core-run-destroy.rs as there is no 'cat' and 'sleep' on vxWorks
2019-07-28 10:05:29 -07:00
bors
4560cb830f Auto merge of - petrochenkov:buildwarn2, r=Mark-Simulacrum
cleanup: Remove lint annotations in specific crates that are already enforced by rustbuild

Remove some random unnecessary lint `allow`s.

Deny `unused_lifetimes` through rustbuild.

r? @Mark-Simulacrum
2019-07-28 16:34:59 +00:00
Giles Cope
4b1d404d83 Better recursive async fn error message.
Co-Authored-By: Mazdak Farrokhzad <twingoow@gmail.com>
2019-07-28 17:03:42 +01:00
Vadim Petrochenkov
1a370109ec Fix cfg(parallel_compiler) mode
Fix rebase
2019-07-28 18:47:03 +03:00
Vadim Petrochenkov
676d282dd3 Deny unused_lifetimes through rustbuild 2019-07-28 18:47:02 +03:00
Vadim Petrochenkov
434152157f Remove lint annotations in specific crates that are already enforced by rustbuild
Remove some random unnecessary lint `allow`s
2019-07-28 18:46:24 +03:00
bors
023525dbda Auto merge of - matthiaskrgr:submodule_upd, r=matthiaskrgr
submodules: update clippy from 164310dd to dc69a5c0

Changes:
````
ci: temporarily disable rustfmt checks/tetss since it's broken for nightly
rustup https://github.com/rust-lang/rust/pull/62964
Bump version of clippy_dummy
update test stderr, not sure which rustc pull request caused this.
rustup https://github.com/rust-lang/rust/pull/62859
Fix tests for edition 2018 compatibility
Revert "Revert global fmt config and use `rustfmt::skip`"
Fix breakage due to 
Fix breakage due to 
Revert global fmt config and use `rustfmt::skip`
Fix fmt
rustup https://github.com/rust-lang/rust/pull/62679/
Update pulldown-cmark to 0.5.3
rustup https://github.com/rust-lang/rust/pull/62764
Add test
Format code
Decrease maximum length for stderr files
Improved imports
Fix "unkown clippy lint" error in UI test.
Corrections for PR review.
Implement lint for inherent to_string() method.
UI Test Cleanup: Extract match_ref_pats tests
Update UI tests
Allow no_effect lint
Remove comment
cargo fmt
UI Test Cleanup: Split up checked_unwrap tests
Removed lintining on never type.
UI Test Cleanup: Split out out_of_bounds_indexing
false positives fixes of `implicit_return`
Ignore generated fresh lifetimes in elision check.
````

fixes clippy toolstate
r? @Manishearth
2019-07-28 12:50:34 +00:00
Matthew Jasper
8876b3b9b0 Resolve const parameters with modern hygiene
Declarations were already modernized, resulting in cases where a macro
couldn't resolve it's own identifier.
2019-07-28 13:34:03 +01:00
Matthew Jasper
3dca17e62d Disallow duplicate lifetime parameters with legacy hygiene
They were resolved with modern hygiene, making this just a strange way
to shadow lifetimes.
2019-07-28 13:33:51 +01:00
Vadim Petrochenkov
61729b3bf0 tidy: Cleanup the directory whitelist 2019-07-28 15:07:16 +03:00
Ralf Jung
c119291b55 get_size_and_align: fix handling of function pointers 2019-07-28 13:26:28 +02:00
Vadim Petrochenkov
b92697b8fb cleanup: Remove some language features related to built-in macros
They are now library features.
2019-07-28 14:14:48 +03:00
Ralf Jung
828e7b685a miri: add get and get_mut to AllocMap; use that in get_size_and_align and avoid rightwards drift 2019-07-28 12:58:39 +02:00
Kornel
55c07b39ae SystemTime docs: recommend Instant for elapsed time 2019-07-28 11:08:39 +01:00
bors
0cfb2f7fbd Auto merge of - Centril:rollup-k1a8z0n, r=Centril
Rollup of 8 pull requests

Successful merges:

 -  (Implement RFC 2707 + Parser recovery for range patterns)
 -  (Actually add rustc-guide to toolstate, don't fail builds for the guide)
 -  (Fix few Clippy warnings)
 -  (bump crossbeam-epoch dependency)
 -  (Avoid ICE when referencing desugared local binding in borrow error)
 -  (In which we constantly improve the Vec(Deque) array PartialEq impls)
 -  (Add test for issue-50900)
 -  (Allow rustbot to add `F-*` + `requires-nightly`.)

Failed merges:

r? @ghost
2019-07-28 09:12:04 +00:00
Mazdak Farrokhzad
370aa19f28
Rollup merge of - rust-lang:some-new-labels, r=pietroalbini
Allow rustbot to add `F-*` + `requires-nightly`.

r? @pietroalbini
2019-07-28 11:11:16 +02:00
Mazdak Farrokhzad
d17ad1b069
Rollup merge of - JohnTitor:test-for-50900, r=Centril
Add test for issue-50900

Closes 
2019-07-28 11:11:15 +02:00
Mazdak Farrokhzad
4b3a017b35
Rollup merge of - Centril:constantly-improving, r=scottmcm
In which we constantly improve the Vec(Deque) array PartialEq impls

Use the same approach as in https://github.com/rust-lang/rust/pull/62435 as sanctioned by https://github.com/rust-lang/rust/issues/61415#issuecomment-504155110.

r? @scottmcm
2019-07-28 11:11:14 +02:00
Mazdak Farrokhzad
a558668cf2
Rollup merge of - estebank:borrow-ice, r=matthewjasper
Avoid ICE when referencing desugared local binding in borrow error

To avoid leaking the names of local bindings from expressions like for loops,  explicitly ignored them, but an assertion that `LocalKind::Var` *must* have a name would trigger an ICE.

Before this change, the binding generated by desugaring the for loop would leak into the diagnostic ():
```
error[E0515]: cannot return value referencing local variable `__next`
  --> return-local-binding-from-desugaring.rs:LL:CC
   |
LL |     for ref x in xs {
   |         ----- `__next` is borrowed here
...
LL |     result
   |     ^^^^^^ returns a value referencing data owned by the current function
```

Ideally `LocalKind` would carry more information to more accurately explain the problem, but for now, in order to avoid the ICE (fix ), we accept `LocalKind::Var` without a name and produce the following output:

```
error[E0515]: cannot return value referencing local binding
  --> $DIR/return-local-binding-from-desugaring.rs:30:5
   |
LL |     for ref x in xs {
   |                  -- local binding introduced here
...
LL |     result
   |     ^^^^^^ returns a value referencing data owned by the current function
```
2019-07-28 11:11:12 +02:00
Mazdak Farrokhzad
48802974aa
Rollup merge of - RalfJung:crossbeam, r=alexcrichton
bump crossbeam-epoch dependency

The new crossbeam-epoch release depends on a memoffset with a whole bunch of soundness holes fixed.

The old memoffset is still indirectly depended on (at least) by rustc-rayon, though -- a crate that looks rather unmaintained (no change in more than a year).
2019-07-28 11:11:10 +02:00
Mazdak Farrokhzad
b405aa2d03
Rollup merge of - mati865:clippy, r=TimNN
Fix few Clippy warnings
2019-07-28 11:11:08 +02:00
Mazdak Farrokhzad
2826bdcfa6
Rollup merge of - mark-i-m:rustc-guide-toolstate-check, r=kennytm
Actually add rustc-guide to toolstate, don't fail builds for the guide

cc @ehuss

r? @kennytm
2019-07-28 11:11:06 +02:00
Mazdak Farrokhzad
75e23ff411
Rollup merge of - Centril:rest-patterns, r=petrochenkov
Implement RFC 2707 + Parser recovery for range patterns

Implement https://github.com/rust-lang/rfcs/pull/2707.

- Add a new basic syntactic pattern form `ast::PatKind::Rest` (parsed as `..` or `DOTDOT`) and simplify `ast::PatKind::{Slice, Tuple, TupleStruct}` as a result.

- Lower `ast::PatKind::Rest` in combination with the aforementioned `PatKind` variants as well as `PatKind::Ident`. The HIR remains unchanged for now (may be advisable to make slight adjustments later).

- Refactor `parser.rs` wrt. parsing sequences and lists of things in the process.

- Add parser recovery for range patterns of form `X..`, `X..=`, `X...`, `..Y`, `..=Y`, and `...Y`.
   This should make it easy to actually support these patterns semantically later if we so desire.

cc https://github.com/rust-lang/rust/issues/62254

r? @petrochenkov
2019-07-28 11:11:04 +02:00
Mazdak Farrokhzad
84c6d3088e
Allow rustbot to add F-* + requires-nightly. 2019-07-28 10:29:38 +02:00
Yuki Okushi
15307ca993 Move to src/test/ui/match/ 2019-07-28 16:51:21 +09:00
Yuki Okushi
29a00ef4a6 Add test for issue-50900 2019-07-28 16:26:01 +09:00
Mazdak Farrokhzad
d33696fcb4 borrowck-describe-lvalue: --bless --compare-mode=nll. 2019-07-28 07:04:16 +02:00
Mazdak Farrokhzad
87742073a0 And --bless tests accordingly for those exceptions. 2019-07-28 06:53:39 +02:00
Mazdak Farrokhzad
18ccd6a33c Add exceptions for ExprKind::Err/TyKind::Error. 2019-07-28 06:53:39 +02:00
Mazdak Farrokhzad
5f4dd1d19a Address comments re. off-topic errors. 2019-07-28 06:53:39 +02:00
Mazdak Farrokhzad
becdba80ea Address comments in lowering + parsing. 2019-07-28 06:53:39 +02:00
Mazdak Farrokhzad
397a027aa7 Use AstP more in lowering. 2019-07-28 06:53:39 +02:00
Mazdak Farrokhzad
59b5dae918 Update error_codes.rs with new subslice syntax. 2019-07-28 06:53:39 +02:00
Mazdak Farrokhzad
acc6a6d8cb --bless tests after rebase. 2019-07-28 06:53:39 +02:00
Mazdak Farrokhzad
1060513ddc Get out of bootstrapping pickle. 2019-07-28 06:53:39 +02:00
Mazdak Farrokhzad
984f9db946 Adjust documentation in HAIR. 2019-07-28 06:53:39 +02:00
Mazdak Farrokhzad
cec8649933 Update unstable book wrt. subslice patterns. 2019-07-28 06:53:39 +02:00
Mazdak Farrokhzad
7c0b1da2c1 Win some lose some; Unfortunately we lost recovery in one case. 2019-07-28 06:53:39 +02:00
Mazdak Farrokhzad
e3cdadd73f (pat, ..,) is now syntactically legal. 2019-07-28 06:53:39 +02:00
Mazdak Farrokhzad
06e5ae5c82 Account for better recovery in two cases. 2019-07-28 06:53:39 +02:00
Mazdak Farrokhzad
e725ea2215 Intersection patterns 'p1 @ p2' are not supported. 2019-07-28 06:53:39 +02:00
Mazdak Farrokhzad
91c8b53f45 --bless tests due to new subslice syntax. 2019-07-28 06:53:39 +02:00