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 7 pull requests #126734

Closed
wants to merge 20 commits into from

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

Veykril and others added 20 commits May 18, 2024 10:29
This removes the ICE codepaths for `f16` and `f128` in Clippy.
`rustc_apfloat` is used as a dependency for the parsing of these types,
since their `FromStr` implementation will not be available in the
standard library for a while.
This makes their intent and expected location clearer. We see some
examples where these comments were not clearly separate from `use`
declarations, which made it hard to understand what the comment is
describing.
Most modules have such a blank line, but some don't. Inserting the blank
line makes it clearer that the `//!` comments are describing the entire
module, rather than the `use` declaration(s) that immediately follows.
Similar to the previous commit.
rustfmt already sorts `use` declarations within the same group.
This belongs on a function, not a `use` declaration.
In rust-lang#120699 I moved some code dealing with `has_future_breakage` earlier
in `emit_diagnostic`. Issue rust-lang#126521 identified a case where that
reordering was invalid (leading to an assertion failure) for some `Expect`
diagnostics.

This commit partially undoes the change, by moving the handling of
unstable `Expect` diagnostics earlier again. This makes
`emit_diagnostic` a bit uglier, but is necessary to fix the problem.

Fixes rust-lang#126521.
These tests reveal some inconsistencies that are tracked by
<rust-lang#126658>.
…dtwco

Add `rust_analyzer` as a predefined tool

Given all the other rust-lang tools have it, I'd expect r-a to have it too. (we have a few ideas for using this rust-lang/rust-analyzer#11556).
…flip1995

Resolve Clippy `f16` and `f128` `unimplemented!`/`FIXME`s

This was originally a PR against the Clippy repo, rust-lang/rust-clippy#12950

r? `@flip1995`

Tracking issue: rust-lang#116909
Fixes: rust-lang#126636
…illot

More status-quo tests for the `#[coverage(..)]` attribute

Follow-up to rust-lang#126621, after I found even more weird corner-cases in the handling of the coverage attribute.

These tests reveal some inconsistencies that are tracked by rust-lang#126658.
Make Option::as_[mut_]slice const

These two functions can both be made `const`. I have added them to the `const_option_ext` feature, rust-lang#91930. I don't believe there is anything blocking stabilization of `as_slice`, but `as_mut_slice` contains mutable references so depends on `const_mut_refs`.
…ps, r=jieyouxu

Clean up some comments near `use` declarations

rust-lang#125443 will reformat all `use` declarations in the repository. There are a few edge cases involving comments on `use` declarations that require care. This PR cleans up some clumsy comment cases, taking us a step closer to rust-lang#125443 being able to merge.

r? `@lqd`
Fix assertion failure for some `Expect` diagnostics.

In rust-lang#120699 I moved some code dealing with `has_future_breakage` earlier in `emit_diagnostic`. Issue rust-lang#126521 identified a case where that reordering was invalid (leading to an assertion failure) for some `Expect` diagnostics.

This commit partially undoes the change, by moving the handling of unstable `Expect` diagnostics earlier again. This makes `emit_diagnostic` a bit uglier, but is necessary to fix the problem.

Fixes rust-lang#126521.

r? `@oli-obk`
…er, r=lcnr

Add opaque type corner case test

r? `@lcnr`

I can't make sense of the new solver tracing logs yet, so I just added the test without explanation.

The old solver does not yet figure out that `Foo == ()` from the where bounds. Unfortunately, even if we make it understand that, it will later try to prove `<X as Trait<'static>>::Out<Foo>: Sized` via the `is_sized_raw` query, which does not take a list of defineable opaque types, causing that check to fail with an ICE.

Thus I'm submitting this test case on its own just to ensure we handle it correctly in the future with any new solver or old solver changes.
@rustbot rustbot added A-run-make Area: port run-make Makefiles to rmake.rs A-testsuite Area: The testsuite used to check the correctness of rustc O-itron Operating System: ITRON O-solid Operating System: SOLID O-unix Operating system: Unix-like PG-exploit-mitigations Project group: Exploit mitigations S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Jun 20, 2024
@rustbot rustbot added T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. rollup A PR which is a rollup labels Jun 20, 2024
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=7

@bors
Copy link
Contributor

bors commented Jun 20, 2024

📌 Commit b381c3c has been approved by matthiaskrgr

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 20, 2024
@rust-log-analyzer
Copy link
Collaborator

The job mingw-check-tidy failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
Getting action download info
Download action repository 'msys2/setup-msys2@v2.22.0' (SHA:cc11e9188b693c2b100158c3322424c4cc1dadea)
Download action repository 'actions/checkout@v4' (SHA:692973e3d937129bcbf40652eb9f2f61becf3332)
Download action repository 'actions/upload-artifact@v4' (SHA:65462800fd760344b1a7b4382951275a0abb4808)
Complete job name: PR - mingw-check-tidy
git config --global core.autocrlf false
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
---
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 \
    && pip3 install virtualenv
COPY host-x86_64/mingw-check/validate-toolstate.sh /scripts/
COPY host-x86_64/mingw-check/validate-error-codes.sh /scripts/

# NOTE: intentionally uses python2 for x.py so we can test it still works.
# NOTE: intentionally uses python2 for x.py so we can test it still works.
# validate-toolstate only runs in our CI, so it's ok for it to only support python3.
ENV SCRIPT TIDY_PRINT_DIFF=1 python2.7 ../x.py test \
           --stage 0 src/tools/tidy tidyselftest --extra-checks=py:lint
# This file is autogenerated by pip-compile with Python 3.10
# by the following command:
#
#    pip-compile --allow-unsafe --generate-hashes reuse-requirements.in
---

#12 [5/8] COPY host-x86_64/mingw-check/reuse-requirements.txt /tmp/
#12 DONE 0.0s

#13 [6/8] RUN pip3 install --no-deps --no-cache-dir --require-hashes -r /tmp/reuse-requirements.txt     && pip3 install virtualenv
#13 0.470   Downloading binaryornot-0.4.4-py2.py3-none-any.whl (9.0 kB)
#13 0.487 Collecting boolean-py==4.0
#13 0.494   Downloading boolean.py-4.0-py3-none-any.whl (25 kB)
#13 0.511 Collecting chardet==5.1.0
---
#13 3.661 Building wheels for collected packages: reuse
#13 3.662   Building wheel for reuse (pyproject.toml): started
#13 3.984   Building wheel for reuse (pyproject.toml): finished with status 'done'
#13 3.985   Created wheel for reuse: filename=reuse-1.1.0-cp310-cp310-manylinux_2_35_x86_64.whl size=181117 sha256=f5f58750481f69515c2c0d1d503daf565e2565c370d07fc6aeb95fe3498b4269
#13 3.985   Stored in directory: /tmp/pip-ephem-wheel-cache-4qzxayp7/wheels/c2/3c/b9/1120c2ab4bd82694f7e6f0537dc5b9a085c13e2c69a8d0c76d
#13 3.988 Installing collected packages: boolean-py, binaryornot, setuptools, reuse, python-debian, markupsafe, license-expression, jinja2, chardet
#13 4.010   Attempting uninstall: setuptools
#13 4.011     Found existing installation: setuptools 59.6.0
#13 4.012     Not uninstalling setuptools at /usr/lib/python3/dist-packages, outside environment /usr
---
#13 5.242   Downloading virtualenv-20.26.2-py3-none-any.whl (3.9 MB)
#13 5.409      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.9/3.9 MB 23.7 MB/s eta 0:00:00
#13 5.467 Collecting filelock<4,>=3.12.2
#13 5.473   Downloading filelock-3.15.3-py3-none-any.whl (16 kB)
#13 5.494 Collecting distlib<1,>=0.3.7
#13 5.500   Downloading distlib-0.3.8-py2.py3-none-any.whl (468 kB)
#13 5.511      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 468.9/468.9 KB 52.2 MB/s eta 0:00:00
#13 5.544 Collecting platformdirs<5,>=3.9.1
#13 5.552   Downloading platformdirs-4.2.2-py3-none-any.whl (18 kB)
#13 5.643 Installing collected packages: distlib, platformdirs, filelock, virtualenv
#13 5.805 Successfully installed distlib-0.3.8 filelock-3.15.3 platformdirs-4.2.2 virtualenv-20.26.2
#13 DONE 5.9s

#14 [7/8] COPY host-x86_64/mingw-check/validate-toolstate.sh /scripts/
#14 DONE 0.0s
---
DirectMap4k:      196544 kB
DirectMap2M:     7143424 kB
DirectMap1G:    11534336 kB
##[endgroup]
Executing TIDY_PRINT_DIFF=1 python2.7 ../x.py test            --stage 0 src/tools/tidy tidyselftest --extra-checks=py:lint
+ TIDY_PRINT_DIFF=1 python2.7 ../x.py test --stage 0 src/tools/tidy tidyselftest --extra-checks=py:lint
    Finished `dev` profile [unoptimized] target(s) in 0.03s
##[endgroup]
downloading https://ci-artifacts.rust-lang.org/rustc-builds-alt/1d96de2a20e963abb8923dfa3c6175517dfb9d2c/rust-dev-nightly-x86_64-unknown-linux-gnu.tar.xz
extracting /checkout/obj/build/cache/llvm-1d96de2a20e963abb8923dfa3c6175517dfb9d2c-true/rust-dev-nightly-x86_64-unknown-linux-gnu.tar.xz to /checkout/obj/build/x86_64-unknown-linux-gnu/ci-llvm
---
   Compiling tidy v0.1.0 (/checkout/src/tools/tidy)
    Finished `release` profile [optimized] target(s) in 25.78s
##[endgroup]
fmt check
##[error]Diff in /checkout/compiler/rustc_resolve/src/macros.rs at line 142:
     }
     // We implicitly add `rustfmt`, `clippy`, `diagnostic`, `miri` and `rust_analyzer` to known
     // tools, but it's not an error to register them explicitly.
-    let predefined_tools = [sym::clippy, sym::rustfmt, sym::diagnostic, sym::miri, sym::rust_analyzer];
+    let predefined_tools =
+        [sym::clippy, sym::rustfmt, sym::diagnostic, sym::miri, sym::rust_analyzer];
     registered_tools.extend(predefined_tools.iter().cloned().map(Ident::with_dummy_span));
 }
 }
fmt error: Running `"/checkout/obj/build/x86_64-unknown-linux-gnu/rustfmt/bin/rustfmt" "--config-path" "/checkout" "--edition" "2021" "--unstable-features" "--skip-children" "--check" "/checkout/compiler/stable_mir/src/error.rs" "/checkout/compiler/stable_mir/src/ty.rs" "/checkout/compiler/stable_mir/src/mir/visit.rs" "/checkout/compiler/stable_mir/src/mir/body.rs" "/checkout/compiler/stable_mir/src/mir/pretty.rs" "/checkout/compiler/stable_mir/src/mir/alloc.rs" "/checkout/compiler/stable_mir/src/mir/mono.rs" "/checkout/compiler/stable_mir/src/crate_def.rs" "/checkout/compiler/stable_mir/src/lib.rs" "/checkout/compiler/stable_mir/src/compiler_interface.rs" "/checkout/compiler/stable_mir/src/target.rs" "/checkout/compiler/rustc_resolve/src/rustdoc.rs" "/checkout/compiler/rustc_resolve/src/macros.rs" "/checkout/compiler/rustc_resolve/src/def_collector.rs" "/checkout/compiler/rustc_resolve/src/late.rs" "/checkout/compiler/rustc_resolve/src/diagnostics.rs" "/checkout/compiler/rustc_resolve/src/imports.rs" "/checkout/compiler/rustc_resolve/src/late/diagnostics.rs" "/checkout/compiler/rustc_resolve/src/effective_visibilities.rs" "/checkout/compiler/rustc_resolve/src/ident.rs" "/checkout/compiler/rustc_resolve/src/lib.rs" "/checkout/compiler/rustc_resolve/src/build_reduced_graph.rs" "/checkout/compiler/rustc_resolve/src/check_unused.rs" "/checkout/compiler/rustc_resolve/src/errors.rs" "/checkout/compiler/rustc_abi/src/layout.rs" "/checkout/compiler/rustc_abi/src/tests.rs" "/checkout/compiler/rustc_abi/src/lib.rs" "/checkout/compiler/rustc_ty_utils/src/layout.rs" "/checkout/compiler/rustc_ty_utils/src/sig_types.rs" "/checkout/compiler/rustc_ty_utils/src/abi.rs" "/checkout/compiler/rustc_ty_utils/src/structural_match.rs" "/checkout/compiler/rustc_ty_utils/src/layout_sanity_check.rs" "/checkout/compiler/rustc_ty_utils/src/assoc.rs" "/checkout/compiler/rustc_ty_utils/src/common_traits.rs" "/checkout/compiler/rustc_ty_utils/src/consts.rs" "/checkout/compiler/rustc_ty_utils/src/ty.rs" "/checkout/compiler/rustc_ty_utils/src/needs_drop.rs" "/checkout/compiler/rustc_ty_utils/src/instance.rs" "/checkout/compiler/rustc_ty_utils/src/implied_bounds.rs" "/checkout/compiler/rustc_ty_utils/src/lib.rs" "/checkout/compiler/rustc_ty_utils/src/errors.rs" "/checkout/compiler/rustc_ty_utils/src/opaque_types.rs" "/checkout/compiler/rustc_ty_utils/src/representability.rs" "/checkout/compiler/rustc_ast_lowering/src/format.rs" "/checkout/compiler/rustc_ast_lowering/src/delegation.rs" "/checkout/compiler/rustc_ast_lowering/src/index.rs" "/checkout/compiler/rustc_ast_lowering/src/asm.rs" "/checkout/compiler/rustc_ast_lowering/src/path.rs" "/checkout/compiler/rustc_ast_lowering/src/lib.rs" "/checkout/compiler/rustc_ast_lowering/src/pat.rs" "/checkout/compiler/rustc_ast_lowering/src/expr.rs" "/checkout/compiler/rustc_ast_lowering/src/lifetime_collector.rs" "/checkout/compiler/rustc_ast_lowering/src/item.rs" "/checkout/compiler/rustc_ast_lowering/src/errors.rs" "/checkout/compiler/rustc_ast_lowering/src/block.rs" "/checkout/compiler/rustc_type_ir/src/interner.rs" "/checkout/compiler/rustc_type_ir/src/predicate_kind.rs" "/checkout/compiler/rustc_type_ir/src/visit.rs" "/checkout/compiler/rustc_type_ir/src/predicate.rs" "/checkout/compiler/rustc_type_ir/src/generic_arg.rs" "/checkout/compiler/rustc_type_ir/src/fold.rs" "/checkout/compiler/rustc_type_ir/src/lift.rs" "/checkout/compiler/rustc_type_ir/src/ty_kind.rs" "/checkout/compiler/stable_mir/src/visitor.rs"` failed.
If you're running `tidy`, try again with `--bless`. Or, if you just want to format code, run `./x.py fmt` instead.
  local time: Thu Jun 20 12:05:09 UTC 2024
  network time: Thu, 20 Jun 2024 12:05:10 GMT
##[error]Process completed with exit code 1.
Post job cleanup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-run-make Area: port run-make Makefiles to rmake.rs A-testsuite Area: The testsuite used to check the correctness of rustc O-itron Operating System: ITRON O-solid Operating System: SOLID O-unix Operating system: Unix-like PG-exploit-mitigations Project group: Exploit mitigations rollup A PR which is a rollup S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

10 participants