Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 4 pull requests #63062

Closed
wants to merge 53 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
0fdf24b
actually test rustc-guide with toolstate
mark-i-m Jul 17, 2019
97b4156
don't fail builds for rustc-guide
mark-i-m Jul 17, 2019
8070bb8
Regressions ok for miri too
mark-i-m Jul 18, 2019
b2d05db
add a few comments for the toolstate stuff
RalfJung Jul 18, 2019
8b87162
Update src/ci/docker/x86_64-gnu-tools/checktools.sh
mark-i-m Jul 18, 2019
17c4084
Update src/ci/docker/x86_64-gnu-tools/checkregression.py
mark-i-m Jul 18, 2019
8940a27
embedded-book failures don't block beta
mark-i-m Jul 18, 2019
1aa1079
Update src/ci/docker/x86_64-gnu-tools/checkregression.py
mark-i-m Jul 18, 2019
9c48ed4
more comments for toolstate scripts
RalfJung Jul 23, 2019
92d432a
more callback docs
RalfJung Jul 23, 2019
82d1841
more comments
RalfJung Jul 23, 2019
11a3b74
add back check for update prs
mark-i-m Jul 23, 2019
c7a599e
bump crossbeam-epoch dependency
RalfJung Jul 25, 2019
a120caf
rustc: Update wasm32 support for LLVM 9
alexcrichton Jul 19, 2019
dc50a63
std: Use native `#[thread_local]` TLS on wasm
alexcrichton Jul 19, 2019
f7c75cc
Add 'ast::PatKind::Rest'.
Centril Jul 6, 2019
ff77ef2
Introduce 'ast::Pat::is_rest(&self) -> bool'.
Centril Jul 9, 2019
633c997
Adjust 'ast::PatKind::{TupleStruct,Tuple,Slice}'.
Centril Jul 9, 2019
12250a2
Adjust feature gating of subslice patterns accordingly.
Centril Jul 9, 2019
b02941f
Adjust pretty printing accordingly.
Centril Jul 9, 2019
8ba5f49
Adjust and document 'Pat::to_ty' accordingly.
Centril Jul 9, 2019
d5df1e0
Adjust lowering of Tuple/TupleStruct patterns.
Centril Jul 9, 2019
694b3c3
Adjust lowering of Slice patterns.
Centril Jul 9, 2019
0a40ef2
Cleanup parse_seq_* methods + record trailing separators.
Centril Jul 9, 2019
7aeb4b7
Add more parse_*_seq methods for code reuse.
Centril Jul 9, 2019
7e1b671
Cleanup using the new parse_*_seq methods.
Centril Jul 9, 2019
62b29a1
Adjust parsing of Slice, Tuple, TupleStruct patterns.
Centril Jul 9, 2019
974413f
Recover on '..X' / '..=X' / '...X' range patterns.
Centril Jul 9, 2019
2f55354
Recover on 'X..' / 'X..=' / 'X...' range patterns.
Centril Jul 9, 2019
2411134
Update tests wrt. recovery of range patterns.
Centril Jul 9, 2019
f6c8234
And also --bless those recovery tests.
Centril Jul 9, 2019
891a736
Test parsing and recovery of all sorts of range patterns.
Centril Jul 9, 2019
75da43d
Use new 'p @ ..' syntax in tests.
Centril Jul 7, 2019
91c8b53
--bless tests due to new subslice syntax.
Centril Jul 7, 2019
e725ea2
Intersection patterns 'p1 @ p2' are not supported.
Centril Jul 8, 2019
06e5ae5
Account for better recovery in two cases.
Centril Jul 9, 2019
e3cdadd
(pat, ..,) is now syntactically legal.
Centril Jul 8, 2019
7c0b1da
Win some lose some; Unfortunately we lost recovery in one case.
Centril Jul 8, 2019
cec8649
Update unstable book wrt. subslice patterns.
Centril Jul 10, 2019
984f9db
Adjust documentation in HAIR.
Centril Jul 10, 2019
1060513
Get out of bootstrapping pickle.
Centril Jul 10, 2019
acc6a6d
--bless tests after rebase.
Centril Jul 10, 2019
59b5dae
Update error_codes.rs with new subslice syntax.
Centril Jul 10, 2019
397a027
Use AstP more in lowering.
Centril Jul 11, 2019
becdba8
Address comments in lowering + parsing.
Centril Jul 24, 2019
5f4dd1d
Address comments re. off-topic errors.
Centril Jul 24, 2019
18ccd6a
Add exceptions for ExprKind::Err/TyKind::Error.
Centril Jul 24, 2019
8774207
And --bless tests accordingly for those exceptions.
Centril Jul 24, 2019
d33696f
borrowck-describe-lvalue: --bless --compare-mode=nll.
Centril Jul 28, 2019
ef2d8c9
Rollup merge of #62550 - Centril:rest-patterns, r=petrochenkov
Centril Jul 28, 2019
56c83c3
Rollup merge of #62759 - mark-i-m:rustc-guide-toolstate-check, r=kennytm
Centril Jul 28, 2019
e5e4c41
Rollup merge of #62809 - alexcrichton:wasm-llvm-9, r=nikic
Centril Jul 28, 2019
11d0be7
Rollup merge of #62974 - RalfJung:crossbeam, r=alexcrichton
Centril Jul 28, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 20 additions & 5 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -590,7 +590,7 @@ name = "crossbeam-deque"
version = "0.6.3"
source = "registry+https:/rust-lang/crates.io-index"
dependencies = [
"crossbeam-epoch 0.7.0 (registry+https:/rust-lang/crates.io-index)",
"crossbeam-epoch 0.7.2 (registry+https:/rust-lang/crates.io-index)",
"crossbeam-utils 0.6.5 (registry+https:/rust-lang/crates.io-index)",
]

Expand All @@ -610,15 +610,15 @@ dependencies = [

[[package]]
name = "crossbeam-epoch"
version = "0.7.0"
version = "0.7.2"
source = "registry+https:/rust-lang/crates.io-index"
dependencies = [
"arrayvec 0.4.7 (registry+https:/rust-lang/crates.io-index)",
"cfg-if 0.1.8 (registry+https:/rust-lang/crates.io-index)",
"crossbeam-utils 0.6.5 (registry+https:/rust-lang/crates.io-index)",
"lazy_static 1.3.0 (registry+https:/rust-lang/crates.io-index)",
"memoffset 0.2.1 (registry+https:/rust-lang/crates.io-index)",
"scopeguard 0.3.3 (registry+https:/rust-lang/crates.io-index)",
"memoffset 0.5.1 (registry+https:/rust-lang/crates.io-index)",
"scopeguard 1.0.0 (registry+https:/rust-lang/crates.io-index)",
]

[[package]]
Expand Down Expand Up @@ -1671,6 +1671,14 @@ name = "memoffset"
version = "0.2.1"
source = "registry+https:/rust-lang/crates.io-index"

[[package]]
name = "memoffset"
version = "0.5.1"
source = "registry+https:/rust-lang/crates.io-index"
dependencies = [
"rustc_version 0.2.3 (registry+https:/rust-lang/crates.io-index)",
]

[[package]]
name = "mime"
version = "0.3.13"
Expand Down Expand Up @@ -3298,6 +3306,11 @@ name = "scopeguard"
version = "0.3.3"
source = "registry+https:/rust-lang/crates.io-index"

[[package]]
name = "scopeguard"
version = "1.0.0"
source = "registry+https:/rust-lang/crates.io-index"

[[package]]
name = "security-framework"
version = "0.3.1"
Expand Down Expand Up @@ -4316,7 +4329,7 @@ source = "registry+https:/rust-lang/crates.io-index"
"checksum crossbeam-deque 0.2.0 (registry+https:/rust-lang/crates.io-index)" = "f739f8c5363aca78cfb059edf753d8f0d36908c348f3d8d1503f03d8b75d9cf3"
"checksum crossbeam-deque 0.6.3 (registry+https:/rust-lang/crates.io-index)" = "05e44b8cf3e1a625844d1750e1f7820da46044ff6d28f4d43e455ba3e5bb2c13"
"checksum crossbeam-epoch 0.3.1 (registry+https:/rust-lang/crates.io-index)" = "927121f5407de9956180ff5e936fe3cf4324279280001cd56b669d28ee7e9150"
"checksum crossbeam-epoch 0.7.0 (registry+https:/rust-lang/crates.io-index)" = "f10a4f8f409aaac4b16a5474fb233624238fcdeefb9ba50d5ea059aab63ba31c"
"checksum crossbeam-epoch 0.7.2 (registry+https:/rust-lang/crates.io-index)" = "fedcd6772e37f3da2a9af9bf12ebe046c0dfe657992377b4df982a2b54cd37a9"
"checksum crossbeam-queue 0.1.2 (registry+https:/rust-lang/crates.io-index)" = "7c979cd6cfe72335896575c6b5688da489e420d36a27a0b9eb0c73db574b4a4b"
"checksum crossbeam-utils 0.2.2 (registry+https:/rust-lang/crates.io-index)" = "2760899e32a1d58d5abb31129f8fae5de75220bc2176e77ff7c627ae45c918d9"
"checksum crossbeam-utils 0.6.5 (registry+https:/rust-lang/crates.io-index)" = "f8306fcef4a7b563b76b7dd949ca48f52bc1141aa067d2ea09565f3e2652aa5c"
Expand Down Expand Up @@ -4426,6 +4439,7 @@ source = "registry+https:/rust-lang/crates.io-index"
"checksum memchr 2.2.0 (registry+https:/rust-lang/crates.io-index)" = "2efc7bc57c883d4a4d6e3246905283d8dae951bb3bd32f49d6ef297f546e1c39"
"checksum memmap 0.6.2 (registry+https:/rust-lang/crates.io-index)" = "e2ffa2c986de11a9df78620c01eeaaf27d94d3ff02bf81bfcca953102dd0c6ff"
"checksum memoffset 0.2.1 (registry+https:/rust-lang/crates.io-index)" = "0f9dc261e2b62d7a622bf416ea3c5245cdd5d9a7fcc428c0d06804dfce1775b3"
"checksum memoffset 0.5.1 (registry+https:/rust-lang/crates.io-index)" = "ce6075db033bbbb7ee5a0bbd3a3186bbae616f57fb001c485c7ff77955f8177f"
"checksum mime 0.3.13 (registry+https:/rust-lang/crates.io-index)" = "3e27ca21f40a310bd06d9031785f4801710d566c184a6e15bad4f1d9b65f9425"
"checksum mime_guess 2.0.0-alpha.6 (registry+https:/rust-lang/crates.io-index)" = "30de2e4613efcba1ec63d8133f344076952090c122992a903359be5a4f99c3ed"
"checksum minifier 0.0.30 (registry+https:/rust-lang/crates.io-index)" = "4c909e78edf61f3aa0dd2086da168cdf304329044bbf248768ca3d20253ec8c0"
Expand Down Expand Up @@ -4528,6 +4542,7 @@ source = "registry+https:/rust-lang/crates.io-index"
"checksum scoped-tls 1.0.0 (registry+https:/rust-lang/crates.io-index)" = "ea6a9290e3c9cf0f18145ef7ffa62d68ee0bf5fcd651017e586dc7fd5da448c2"
"checksum scoped_threadpool 0.1.9 (registry+https:/rust-lang/crates.io-index)" = "1d51f5df5af43ab3f1360b429fa5e0152ac5ce8c0bd6485cae490332e96846a8"
"checksum scopeguard 0.3.3 (registry+https:/rust-lang/crates.io-index)" = "94258f53601af11e6a49f722422f6e3425c52b06245a5cf9bc09908b174f5e27"
"checksum scopeguard 1.0.0 (registry+https:/rust-lang/crates.io-index)" = "b42e15e59b18a828bbf5c58ea01debb36b9b096346de35d941dcb89009f24a0d"
"checksum security-framework 0.3.1 (registry+https:/rust-lang/crates.io-index)" = "eee63d0f4a9ec776eeb30e220f0bc1e092c3ad744b2a379e3993070364d3adc2"
"checksum security-framework-sys 0.3.1 (registry+https:/rust-lang/crates.io-index)" = "9636f8989cbf61385ae4824b98c1aaa54c994d7d8b41f11c601ed799f0549a56"
"checksum semver 0.9.0 (registry+https:/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403"
Expand Down
12 changes: 11 additions & 1 deletion src/ci/docker/x86_64-gnu-tools/checkregression.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-

## This script has two purposes: detect any tool that *regressed*, which is used
## during the week before the beta branches to reject PRs; and detect any tool
## that *changed* to see if we need to update the toolstate repo.

import sys
import json

# Regressions for these tools during the beta cutoff week do not cause failure.
# See `status_check` in `checktools.sh` for tools that have to pass on the
# beta/stable branches.
REGRESSION_OK = ["rustc-guide", "miri", "embedded-book"]

if __name__ == '__main__':
os_name = sys.argv[1]
toolstate_file = sys.argv[2]
Expand Down Expand Up @@ -32,7 +41,8 @@
'The state of "{}" has {} from "{}" to "{}"'
.format(tool, verb, state, new_state)
)
regressed = True
if not (verb == 'regressed' and tool in REGRESSION_OK):
regressed = True

if regressed:
sys.exit(1)
19 changes: 15 additions & 4 deletions src/ci/docker/x86_64-gnu-tools/checktools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ python2.7 "$X_PY" test --no-fail-fast \
src/doc/rust-by-example \
src/doc/embedded-book \
src/doc/edition-guide \
src/doc/rustc-guide \
src/tools/clippy \
src/tools/rls \
src/tools/rustfmt \
Expand All @@ -41,7 +42,7 @@ check_tool_failed() {
}

# This function checks that if a tool's submodule changed, the tool's state must improve
verify_status() {
verify_submodule_changed() {
echo "Verifying status of $1..."
if echo "$CHANGED_FILES" | grep -q "^M[[:blank:]]$2$"; then
echo "This PR updated '$2', verifying if status is 'test-pass'..."
Expand All @@ -66,7 +67,7 @@ verify_status() {
check_dispatch() {
if [ "$1" = submodule_changed ]; then
# ignore $2 (branch id)
verify_status $3 $4
verify_submodule_changed $3 $4
elif [ "$2" = beta ]; then
echo "Requiring test passing for $3..."
if check_tool_failed "$3"; then
Expand All @@ -75,7 +76,12 @@ check_dispatch() {
fi
}

# list all tools here
# List all tools here.
# This function gets called with "submodule_changed" for each PR that changed a submodule,
# and with "beta_required" for each PR that lands on beta/stable.
# The purpose of this function is to *reject* PRs if a tool is not "test-pass" and
# (a) the tool's submodule has been updated, or (b) we landed on beta/stable and the
# tool has to "test-pass" on that branch.
status_check() {
check_dispatch $1 beta book src/doc/book
check_dispatch $1 beta nomicon src/doc/nomicon
Expand All @@ -85,7 +91,10 @@ status_check() {
check_dispatch $1 beta rls src/tools/rls
check_dispatch $1 beta rustfmt src/tools/rustfmt
check_dispatch $1 beta clippy-driver src/tools/clippy
# these tools are not required for beta to successfully branch
# These tools are not required on the beta/stable branches, but they *do* cause
# PRs to fail if a submodule update does not fix them.
# They will still cause failure during the beta cutoff week, unless `checkregression.py`
# exempts them from that.
check_dispatch $1 nightly miri src/tools/miri
check_dispatch $1 nightly embedded-book src/doc/embedded-book
check_dispatch $1 nightly rustc-guide src/doc/rustc-guide
Expand All @@ -97,12 +106,14 @@ status_check() {
status_check "submodule_changed"

CHECK_NOT="$(readlink -f "$(dirname $0)/checkregression.py")"
# This callback is called by `commit_toolstate_change`, see `repo.sh`.
change_toolstate() {
# only update the history
if python2.7 "$CHECK_NOT" "$OS" "$TOOLSTATE_FILE" "_data/latest.json" changed; then
echo 'Toolstate is not changed. Not updating.'
else
if [ $SIX_WEEK_CYCLE -ge 35 ]; then
# Reject any regressions during the week before beta cutoff.
python2.7 "$CHECK_NOT" "$OS" "$TOOLSTATE_FILE" "_data/latest.json" regressed
fi
sed -i "1 a\\
Expand Down
7 changes: 7 additions & 0 deletions src/ci/docker/x86_64-gnu-tools/repo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,13 @@ commit_toolstate_change() {
MESSAGE_FILE="$1"
shift
for RETRY_COUNT in 1 2 3 4 5; do
# Call the callback.
# - If we are in the `auto` branch (pre-landing), this is called from `checktools.sh` and
# the callback is `change_toolstate` in that file. The purpose of this is to publish the
# test results (the new commit-to-toolstate mapping) in the toolstate repo.
# - If we are in the `master` branch (post-landing), this is called by the CI pipeline
# and the callback is `src/tools/publish_toolstate.py`. The purpose is to publish
# the new "current" toolstate in the toolstate repo.
"$@"
# `git commit` failing means nothing to commit.
FAILURE=0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ matched against that pattern. For example:
fn is_symmetric(list: &[u32]) -> bool {
match list {
&[] | &[_] => true,
&[x, ref inside.., y] if x == y => is_symmetric(inside),
&[x, ref inside @ .., y] if x == y => is_symmetric(inside),
&[..] => false,
}
}
Expand Down
Loading