diff options
| author | bors <bors@rust-lang.org> | 2022-12-23 19:46:36 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-12-23 19:46:36 +0000 |
| commit | af3e06f1bf4ca49407562b1b84744e27905bea98 (patch) | |
| tree | ce0b3fc316a14a85207d47154204f8d60d8e944a /src | |
| parent | c2ff8ad035deebde575235db310eb27afb3af7a8 (diff) | |
| parent | 659c218b3aadf1ea42de0e208c2d934763d8935d (diff) | |
Auto merge of #106087 - Nilstrieb:rollup-2m3nies, r=Nilstrieb
Rollup of 6 pull requests Successful merges: - #105661 (implement the skeleton of the updated trait solver) - #105853 (Make the pre-push script work on directories with spaces) - #106043 (Move tests) - #106048 (Run `tidy` in its own job in PR CI) - #106055 (Check arg expressions properly on error in `confirm_builtin_call`) - #106067 (A few metadata nits) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'src')
| -rw-r--r-- | src/ci/docker/host-x86_64/mingw-check-tidy/Dockerfile | 36 | ||||
| -rw-r--r-- | src/ci/docker/host-x86_64/mingw-check/Dockerfile | 1 | ||||
| -rw-r--r-- | src/ci/github-actions/ci.yml | 10 | ||||
| -rwxr-xr-x | src/etc/pre-push.sh | 12 | ||||
| -rw-r--r-- | src/test/ui/fn/issue-3044.rs (renamed from src/test/ui/issues/issue-3044.rs) | 0 | ||||
| -rw-r--r-- | src/test/ui/fn/issue-3044.stderr (renamed from src/test/ui/issues/issue-3044.stderr) | 0 | ||||
| -rw-r--r-- | src/test/ui/fn/issue-3904.rs (renamed from src/test/ui/issues/issue-3904.rs) | 0 | ||||
| -rw-r--r-- | src/test/ui/issues/issue-6470.rs | 17 | ||||
| -rw-r--r-- | src/test/ui/late-bound-lifetimes/issue-36381.rs (renamed from src/test/ui/issues/issue-36381.rs) | 0 | ||||
| -rw-r--r-- | src/test/ui/macros/issue-25385.rs (renamed from src/test/ui/issues/issue-25385.rs) | 0 | ||||
| -rw-r--r-- | src/test/ui/macros/issue-25385.stderr (renamed from src/test/ui/issues/issue-25385.stderr) | 0 | ||||
| -rw-r--r-- | src/test/ui/match/issue-5530.rs (renamed from src/test/ui/issues/issue-5530.rs) | 0 | ||||
| -rw-r--r-- | src/test/ui/resolve/auxiliary/issue-30535.rs (renamed from src/test/ui/issues/auxiliary/issue-30535.rs) | 0 | ||||
| -rw-r--r-- | src/test/ui/resolve/issue-30535.rs (renamed from src/test/ui/issues/issue-30535.rs) | 0 | ||||
| -rw-r--r-- | src/test/ui/resolve/issue-30535.stderr (renamed from src/test/ui/issues/issue-30535.stderr) | 0 | ||||
| -rw-r--r-- | src/test/ui/resolve/issue-39559-2.rs (renamed from src/test/ui/issues/issue-39559-2.rs) | 0 | ||||
| -rw-r--r-- | src/test/ui/resolve/issue-39559-2.stderr (renamed from src/test/ui/issues/issue-39559-2.stderr) | 0 | ||||
| -rw-r--r-- | src/test/ui/resolve/issue-39559.rs (renamed from src/test/ui/issues/issue-39559.rs) | 0 | ||||
| -rw-r--r-- | src/test/ui/resolve/issue-39559.stderr (renamed from src/test/ui/issues/issue-39559.stderr) | 0 | ||||
| -rw-r--r-- | src/test/ui/static/issue-18118-2.rs (renamed from src/test/ui/issues/issue-18118-2.rs) | 0 | ||||
| -rw-r--r-- | src/test/ui/static/issue-18118-2.stderr (renamed from src/test/ui/issues/issue-18118-2.stderr) | 0 | ||||
| -rw-r--r-- | src/test/ui/static/issue-18118.rs (renamed from src/test/ui/issues/issue-18118.rs) | 0 | ||||
| -rw-r--r-- | src/test/ui/static/issue-18118.stderr (renamed from src/test/ui/issues/issue-18118.stderr) | 0 | ||||
| -rw-r--r-- | src/test/ui/suggestions/fn-to-method-deeply-nested.rs | 13 | ||||
| -rw-r--r-- | src/test/ui/suggestions/fn-to-method-deeply-nested.stderr | 39 | ||||
| -rw-r--r-- | src/test/ui/test-attrs/issue-52557.rs (renamed from src/test/ui/issues/issue-52557.rs) | 0 | ||||
| -rw-r--r-- | src/test/ui/traits/solver-cycles/inductive-canonical-cycle.rs | 28 | ||||
| -rw-r--r-- | src/test/ui/traits/solver-cycles/inductive-canonical-cycle.stderr | 26 | ||||
| -rw-r--r-- | src/test/ui/typeck/check-args-on-fn-err-2.rs | 5 | ||||
| -rw-r--r-- | src/test/ui/typeck/check-args-on-fn-err-2.stderr | 23 | ||||
| -rw-r--r-- | src/test/ui/typeck/check-args-on-fn-err.rs | 6 | ||||
| -rw-r--r-- | src/test/ui/typeck/check-args-on-fn-err.stderr | 9 | ||||
| -rw-r--r-- | src/test/ui/typeck/issue-22375.rs (renamed from src/test/ui/issues/issue-22375.rs) | 0 | ||||
| -rw-r--r-- | src/tools/tidy/src/ui_tests.rs | 2 |
34 files changed, 197 insertions, 30 deletions
diff --git a/src/ci/docker/host-x86_64/mingw-check-tidy/Dockerfile b/src/ci/docker/host-x86_64/mingw-check-tidy/Dockerfile new file mode 100644 index 00000000000..78fee152eb9 --- /dev/null +++ b/src/ci/docker/host-x86_64/mingw-check-tidy/Dockerfile @@ -0,0 +1,36 @@ +FROM ubuntu:18.04 +# FIXME: when bumping the version, remove the Python 3.6-specific changes in +# the reuse-requirements.in file, regenerate reuse-requirements.txt and remove +# this comment. + +RUN apt-get update && apt-get install -y --no-install-recommends \ + g++ \ + make \ + ninja-build \ + file \ + curl \ + ca-certificates \ + python3 \ + python3-pip \ + python3-pkg-resources \ + git \ + cmake \ + sudo \ + gdb \ + xz-utils \ + libssl-dev \ + pkg-config \ + mingw-w64 \ + && rm -rf /var/lib/apt/lists/* + +COPY scripts/sccache.sh /scripts/ +RUN sh /scripts/sccache.sh + +COPY host-x86_64/mingw-check/reuse-requirements.txt /tmp/ +RUN pip3 install --no-deps --no-cache-dir --require-hashes -r /tmp/reuse-requirements.txt + +COPY host-x86_64/mingw-check/validate-toolstate.sh /scripts/ +COPY host-x86_64/mingw-check/validate-error-codes.sh /scripts/ + +ENV RUN_CHECK_WITH_PARALLEL_QUERIES 1 +ENV SCRIPT python3 ../x.py test --stage 0 src/tools/tidy diff --git a/src/ci/docker/host-x86_64/mingw-check/Dockerfile b/src/ci/docker/host-x86_64/mingw-check/Dockerfile index 9e2568af13f..adf6bb4b377 100644 --- a/src/ci/docker/host-x86_64/mingw-check/Dockerfile +++ b/src/ci/docker/host-x86_64/mingw-check/Dockerfile @@ -40,7 +40,6 @@ COPY host-x86_64/mingw-check/validate-error-codes.sh /scripts/ ENV RUN_CHECK_WITH_PARALLEL_QUERIES 1 ENV SCRIPT python3 ../x.py --stage 2 test src/tools/expand-yaml-anchors && \ - python3 ../x.py test --stage 0 src/tools/tidy && \ python3 ../x.py check --target=i686-pc-windows-gnu --host=i686-pc-windows-gnu --all-targets && \ python3 ../x.py build --stage 0 src/tools/build-manifest && \ python3 ../x.py test --stage 0 src/tools/compiletest && \ diff --git a/src/ci/github-actions/ci.yml b/src/ci/github-actions/ci.yml index d1ba46ad30d..d33396dcc80 100644 --- a/src/ci/github-actions/ci.yml +++ b/src/ci/github-actions/ci.yml @@ -287,19 +287,27 @@ jobs: env: <<: [*shared-ci-variables, *public-variables] if: github.event_name == 'pull_request' + continue-on-error: ${{ matrix.tidy }} strategy: matrix: include: - name: mingw-check <<: *job-linux-xl + tidy: false + + - name: mingw-check-tidy + <<: *job-linux-xl + tidy: true - name: x86_64-gnu-llvm-13 <<: *job-linux-xl + tidy: false - name: x86_64-gnu-tools + <<: *job-linux-xl + tidy: false env: CI_ONLY_WHEN_SUBMODULES_CHANGED: 1 - <<: *job-linux-xl auto: permissions: diff --git a/src/etc/pre-push.sh b/src/etc/pre-push.sh index be7de3ebaf5..2a3086338b4 100755 --- a/src/etc/pre-push.sh +++ b/src/etc/pre-push.sh @@ -10,16 +10,8 @@ set -Eeuo pipefail # https://github.com/rust-lang/rust/issues/77620#issuecomment-705144570 unset GIT_DIR ROOT_DIR="$(git rev-parse --show-toplevel)" -COMMAND="$ROOT_DIR/x.py test tidy" -if [[ "$OSTYPE" == "msys" || "$OSTYPE" == "win32" ]]; then - COMMAND="python $COMMAND" -elif ! command -v python &> /dev/null; then - COMMAND="python3 $COMMAND" -fi - -echo "Running pre-push script '$COMMAND'" +echo "Running pre-push script $ROOT_DIR/x test tidy" cd "$ROOT_DIR" - -$COMMAND +./x test tidy diff --git a/src/test/ui/issues/issue-3044.rs b/src/test/ui/fn/issue-3044.rs index 7c626a01b12..7c626a01b12 100644 --- a/src/test/ui/issues/issue-3044.rs +++ b/src/test/ui/fn/issue-3044.rs diff --git a/src/test/ui/issues/issue-3044.stderr b/src/test/ui/fn/issue-3044.stderr index 1232b83c391..1232b83c391 100644 --- a/src/test/ui/issues/issue-3044.stderr +++ b/src/test/ui/fn/issue-3044.stderr diff --git a/src/test/ui/issues/issue-3904.rs b/src/test/ui/fn/issue-3904.rs index 7beb91a28d2..7beb91a28d2 100644 --- a/src/test/ui/issues/issue-3904.rs +++ b/src/test/ui/fn/issue-3904.rs diff --git a/src/test/ui/issues/issue-6470.rs b/src/test/ui/issues/issue-6470.rs deleted file mode 100644 index 8c6192a59db..00000000000 --- a/src/test/ui/issues/issue-6470.rs +++ /dev/null @@ -1,17 +0,0 @@ -// build-pass -#![allow(dead_code)] -#![allow(improper_ctypes)] -// pretty-expanded FIXME #23616 -#![allow(non_snake_case)] - -pub mod Bar { - pub struct Foo { - v: isize, - } - - extern "C" { - pub fn foo(v: *const Foo) -> Foo; - } -} - -pub fn main() {} diff --git a/src/test/ui/issues/issue-36381.rs b/src/test/ui/late-bound-lifetimes/issue-36381.rs index 7db56f1dce8..7db56f1dce8 100644 --- a/src/test/ui/issues/issue-36381.rs +++ b/src/test/ui/late-bound-lifetimes/issue-36381.rs diff --git a/src/test/ui/issues/issue-25385.rs b/src/test/ui/macros/issue-25385.rs index ea042a6c76b..ea042a6c76b 100644 --- a/src/test/ui/issues/issue-25385.rs +++ b/src/test/ui/macros/issue-25385.rs diff --git a/src/test/ui/issues/issue-25385.stderr b/src/test/ui/macros/issue-25385.stderr index 39dbdd753a6..39dbdd753a6 100644 --- a/src/test/ui/issues/issue-25385.stderr +++ b/src/test/ui/macros/issue-25385.stderr diff --git a/src/test/ui/issues/issue-5530.rs b/src/test/ui/match/issue-5530.rs index 72731cbb177..72731cbb177 100644 --- a/src/test/ui/issues/issue-5530.rs +++ b/src/test/ui/match/issue-5530.rs diff --git a/src/test/ui/issues/auxiliary/issue-30535.rs b/src/test/ui/resolve/auxiliary/issue-30535.rs index 3608d4a2f14..3608d4a2f14 100644 --- a/src/test/ui/issues/auxiliary/issue-30535.rs +++ b/src/test/ui/resolve/auxiliary/issue-30535.rs diff --git a/src/test/ui/issues/issue-30535.rs b/src/test/ui/resolve/issue-30535.rs index d48f00d5aca..d48f00d5aca 100644 --- a/src/test/ui/issues/issue-30535.rs +++ b/src/test/ui/resolve/issue-30535.rs diff --git a/src/test/ui/issues/issue-30535.stderr b/src/test/ui/resolve/issue-30535.stderr index e3692934b62..e3692934b62 100644 --- a/src/test/ui/issues/issue-30535.stderr +++ b/src/test/ui/resolve/issue-30535.stderr diff --git a/src/test/ui/issues/issue-39559-2.rs b/src/test/ui/resolve/issue-39559-2.rs index 07d3a82b1ed..07d3a82b1ed 100644 --- a/src/test/ui/issues/issue-39559-2.rs +++ b/src/test/ui/resolve/issue-39559-2.rs diff --git a/src/test/ui/issues/issue-39559-2.stderr b/src/test/ui/resolve/issue-39559-2.stderr index ea27e7bd250..ea27e7bd250 100644 --- a/src/test/ui/issues/issue-39559-2.stderr +++ b/src/test/ui/resolve/issue-39559-2.stderr diff --git a/src/test/ui/issues/issue-39559.rs b/src/test/ui/resolve/issue-39559.rs index 58d25940733..58d25940733 100644 --- a/src/test/ui/issues/issue-39559.rs +++ b/src/test/ui/resolve/issue-39559.rs diff --git a/src/test/ui/issues/issue-39559.stderr b/src/test/ui/resolve/issue-39559.stderr index 7626f827fc5..7626f827fc5 100644 --- a/src/test/ui/issues/issue-39559.stderr +++ b/src/test/ui/resolve/issue-39559.stderr diff --git a/src/test/ui/issues/issue-18118-2.rs b/src/test/ui/static/issue-18118-2.rs index f712a2eedb7..f712a2eedb7 100644 --- a/src/test/ui/issues/issue-18118-2.rs +++ b/src/test/ui/static/issue-18118-2.rs diff --git a/src/test/ui/issues/issue-18118-2.stderr b/src/test/ui/static/issue-18118-2.stderr index 4fc3ca78f96..4fc3ca78f96 100644 --- a/src/test/ui/issues/issue-18118-2.stderr +++ b/src/test/ui/static/issue-18118-2.stderr diff --git a/src/test/ui/issues/issue-18118.rs b/src/test/ui/static/issue-18118.rs index f58a3de281f..f58a3de281f 100644 --- a/src/test/ui/issues/issue-18118.rs +++ b/src/test/ui/static/issue-18118.rs diff --git a/src/test/ui/issues/issue-18118.stderr b/src/test/ui/static/issue-18118.stderr index 49798a148de..49798a148de 100644 --- a/src/test/ui/issues/issue-18118.stderr +++ b/src/test/ui/static/issue-18118.stderr diff --git a/src/test/ui/suggestions/fn-to-method-deeply-nested.rs b/src/test/ui/suggestions/fn-to-method-deeply-nested.rs new file mode 100644 index 00000000000..58ee3d6409a --- /dev/null +++ b/src/test/ui/suggestions/fn-to-method-deeply-nested.rs @@ -0,0 +1,13 @@ +fn main() -> Result<(), ()> { + a(b(c(d(e( + //~^ ERROR cannot find function `a` in this scope + //~| ERROR cannot find function `b` in this scope + //~| ERROR cannot find function `c` in this scope + //~| ERROR cannot find function `d` in this scope + //~| ERROR cannot find function `e` in this scope + z???????????????????????????????????????????????????????????????????????????????????????? + ????????????????????????????????????????????????????????????????????????????????????????? + ?????????????????????????????????????????????????????????????????? + //~^^^ ERROR cannot find value `z` in this scope + ))))) +} diff --git a/src/test/ui/suggestions/fn-to-method-deeply-nested.stderr b/src/test/ui/suggestions/fn-to-method-deeply-nested.stderr new file mode 100644 index 00000000000..ce813ea7aba --- /dev/null +++ b/src/test/ui/suggestions/fn-to-method-deeply-nested.stderr @@ -0,0 +1,39 @@ +error[E0425]: cannot find value `z` in this scope + --> $DIR/fn-to-method-deeply-nested.rs:8:9 + | +LL | z???????????????????????????????????????????????????????????????????????????????????????? + | ^ not found in this scope + +error[E0425]: cannot find function `e` in this scope + --> $DIR/fn-to-method-deeply-nested.rs:2:13 + | +LL | a(b(c(d(e( + | ^ not found in this scope + +error[E0425]: cannot find function `d` in this scope + --> $DIR/fn-to-method-deeply-nested.rs:2:11 + | +LL | a(b(c(d(e( + | ^ not found in this scope + +error[E0425]: cannot find function `c` in this scope + --> $DIR/fn-to-method-deeply-nested.rs:2:9 + | +LL | a(b(c(d(e( + | ^ not found in this scope + +error[E0425]: cannot find function `b` in this scope + --> $DIR/fn-to-method-deeply-nested.rs:2:7 + | +LL | a(b(c(d(e( + | ^ not found in this scope + +error[E0425]: cannot find function `a` in this scope + --> $DIR/fn-to-method-deeply-nested.rs:2:5 + | +LL | a(b(c(d(e( + | ^ not found in this scope + +error: aborting due to 6 previous errors + +For more information about this error, try `rustc --explain E0425`. diff --git a/src/test/ui/issues/issue-52557.rs b/src/test/ui/test-attrs/issue-52557.rs index 09f7a8c5131..09f7a8c5131 100644 --- a/src/test/ui/issues/issue-52557.rs +++ b/src/test/ui/test-attrs/issue-52557.rs diff --git a/src/test/ui/traits/solver-cycles/inductive-canonical-cycle.rs b/src/test/ui/traits/solver-cycles/inductive-canonical-cycle.rs new file mode 100644 index 00000000000..a3bb76d7e3b --- /dev/null +++ b/src/test/ui/traits/solver-cycles/inductive-canonical-cycle.rs @@ -0,0 +1,28 @@ +// known-bug + +// This should compile but fails with the current solver. +// +// This checks that the new solver uses `Ambiguous` when hitting the +// inductive cycle here when proving `exists<^0, ^1> (): Trait<^0, ^1>` +// which requires proving `Trait<?1, ?0>` but that has the same +// canonical representation. +trait Trait<T, U> {} + +impl<T, U> Trait<T, U> for () +where + (): Trait<U, T>, + T: OtherTrait, +{} + +trait OtherTrait {} +impl OtherTrait for u32 {} + +fn require_trait<T, U>() +where + (): Trait<T, U> +{} + +fn main() { + require_trait::<_, _>(); + //~^ ERROR overflow evaluating +} diff --git a/src/test/ui/traits/solver-cycles/inductive-canonical-cycle.stderr b/src/test/ui/traits/solver-cycles/inductive-canonical-cycle.stderr new file mode 100644 index 00000000000..e4b84e07822 --- /dev/null +++ b/src/test/ui/traits/solver-cycles/inductive-canonical-cycle.stderr @@ -0,0 +1,26 @@ +error[E0275]: overflow evaluating the requirement `_: Sized` + --> $DIR/inductive-canonical-cycle.rs:26:5 + | +LL | require_trait::<_, _>(); + | ^^^^^^^^^^^^^^^^^^^^^ + | + = help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`inductive_canonical_cycle`) +note: required for `()` to implement `Trait<_, _>` + --> $DIR/inductive-canonical-cycle.rs:11:12 + | +LL | impl<T, U> Trait<T, U> for () + | ^^^^^^^^^^^ ^^ + = note: 128 redundant requirements hidden + = note: required for `()` to implement `Trait<_, _>` +note: required by a bound in `require_trait` + --> $DIR/inductive-canonical-cycle.rs:22:9 + | +LL | fn require_trait<T, U>() + | ------------- required by a bound in this +LL | where +LL | (): Trait<T, U> + | ^^^^^^^^^^^ required by this bound in `require_trait` + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0275`. diff --git a/src/test/ui/typeck/check-args-on-fn-err-2.rs b/src/test/ui/typeck/check-args-on-fn-err-2.rs new file mode 100644 index 00000000000..af57dbe3317 --- /dev/null +++ b/src/test/ui/typeck/check-args-on-fn-err-2.rs @@ -0,0 +1,5 @@ +fn main() { + a((), 1i32 == 2u32); + //~^ ERROR cannot find function `a` in this scope + //~| ERROR mismatched types +} diff --git a/src/test/ui/typeck/check-args-on-fn-err-2.stderr b/src/test/ui/typeck/check-args-on-fn-err-2.stderr new file mode 100644 index 00000000000..301bb88dbac --- /dev/null +++ b/src/test/ui/typeck/check-args-on-fn-err-2.stderr @@ -0,0 +1,23 @@ +error[E0308]: mismatched types + --> $DIR/check-args-on-fn-err-2.rs:2:19 + | +LL | a((), 1i32 == 2u32); + | ---- ^^^^ expected `i32`, found `u32` + | | + | expected because this is `i32` + | +help: change the type of the numeric literal from `u32` to `i32` + | +LL | a((), 1i32 == 2i32); + | ~~~ + +error[E0425]: cannot find function `a` in this scope + --> $DIR/check-args-on-fn-err-2.rs:2:5 + | +LL | a((), 1i32 == 2u32); + | ^ not found in this scope + +error: aborting due to 2 previous errors + +Some errors have detailed explanations: E0308, E0425. +For more information about an error, try `rustc --explain E0308`. diff --git a/src/test/ui/typeck/check-args-on-fn-err.rs b/src/test/ui/typeck/check-args-on-fn-err.rs new file mode 100644 index 00000000000..04b98ddd952 --- /dev/null +++ b/src/test/ui/typeck/check-args-on-fn-err.rs @@ -0,0 +1,6 @@ +fn main() { + unknown(1, |glyf| { + //~^ ERROR: cannot find function `unknown` in this scope + let actual = glyf; + }); +} diff --git a/src/test/ui/typeck/check-args-on-fn-err.stderr b/src/test/ui/typeck/check-args-on-fn-err.stderr new file mode 100644 index 00000000000..864d33e0e93 --- /dev/null +++ b/src/test/ui/typeck/check-args-on-fn-err.stderr @@ -0,0 +1,9 @@ +error[E0425]: cannot find function `unknown` in this scope + --> $DIR/check-args-on-fn-err.rs:2:5 + | +LL | unknown(1, |glyf| { + | ^^^^^^^ not found in this scope + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0425`. diff --git a/src/test/ui/issues/issue-22375.rs b/src/test/ui/typeck/issue-22375.rs index 21a1a4c8380..21a1a4c8380 100644 --- a/src/test/ui/issues/issue-22375.rs +++ b/src/test/ui/typeck/issue-22375.rs diff --git a/src/tools/tidy/src/ui_tests.rs b/src/tools/tidy/src/ui_tests.rs index 19e2528bb24..f746bdeffd7 100644 --- a/src/tools/tidy/src/ui_tests.rs +++ b/src/tools/tidy/src/ui_tests.rs @@ -10,7 +10,7 @@ use std::path::Path; const ENTRY_LIMIT: usize = 1000; // FIXME: The following limits should be reduced eventually. const ROOT_ENTRY_LIMIT: usize = 939; -const ISSUES_ENTRY_LIMIT: usize = 2040; +const ISSUES_ENTRY_LIMIT: usize = 2020; fn check_entries(path: &Path, bad: &mut bool) { for dir in Walk::new(&path.join("test/ui")) { |
