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 6 pull requests #125857

Closed
wants to merge 16 commits into from

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

tspiteri and others added 16 commits April 23, 2024 15:49
The test confirms that when val < base, we do not divide or multiply.
     Locking 15 packages to latest compatible versions
    Updating cc v1.0.97 -> v1.0.98
    Updating crc32fast v1.4.0 -> v1.4.2
    Updating crossbeam-channel v0.5.12 -> v0.5.13
    Updating crossbeam-utils v0.8.19 -> v0.8.20
    Updating getrandom v0.2.14 -> v0.2.15
    Updating libz-sys v1.1.16 -> v1.1.18
    Updating nu-ansi-term v0.49.0 -> v0.50.0
    Updating parking_lot v0.12.2 -> v0.12.3
    Updating proc-macro2 v1.0.82 -> v1.0.84
    Updating r-efi v4.4.0 -> v4.5.0
    Updating serde v1.0.202 -> v1.0.203
    Updating serde_derive v1.0.202 -> v1.0.203
    Updating spanned v0.2.0 -> v0.2.1
    Updating syn v2.0.64 -> v2.0.66
    Updating tracing-tree v0.3.0 -> v0.3.1
note: pass `--verbose` to see 80 unchanged dependencies behind latest
Wrap overly long ones, etc.
It has a clumsy type, with repeated `&'a [LintId]`, and sometimes
requires an empty string that isn't used in the `Err`+`None` case.

This commit splits it into two variants.
As of rust-lang#125408 PR,
rustbook now relies on dependencies from the "src/doc/book" submodule.

However, bootstrap does not automatically sync this submodule before reading
metadata informations. And if the submodule is not present, reading
metadata will fail because rustbook's dependencies will be missing.

This change makes "src/doc/book" to be fetched/synced automatically
before trying to read metadata.

Signed-off-by: onur-ozkan <work@onurozkan.dev>
Unroll first iteration of checked_ilog loop

This follows the optimization of rust-lang#115913. As shown in rust-lang#115913 (comment), the performance was improved in all important cases, but some regressions were introduced for the benchmarks `u32_log_random_small`, `u8_log_random` and `u8_log_random_small`.

Basically, rust-lang#115913 changed the implementation from one division per iteration to one multiplication per iteration plus one division. When there are zero iterations, this is a regression from zero divisions to one division.

This PR avoids this by avoiding the division if we need zero iterations by returning `Some(0)` early. It also reduces the number of multiplications by one in all other cases.
…=cjgillot

`rustc_lint` cleanups

Minor improvements I found while looking through this code.

r? `@cjgillot`
…ulacrum

Weekly `cargo update`

Automation to keep dependencies in `Cargo.lock` current.

The following is the output from `cargo update`:

```txt
     Locking 15 packages to latest compatible versions
    Updating cc v1.0.97 -> v1.0.98
    Updating crc32fast v1.4.0 -> v1.4.2
    Updating crossbeam-channel v0.5.12 -> v0.5.13
    Updating crossbeam-utils v0.8.19 -> v0.8.20
    Updating getrandom v0.2.14 -> v0.2.15
    Updating libz-sys v1.1.16 -> v1.1.18
    Updating nu-ansi-term v0.49.0 -> v0.50.0
    Updating parking_lot v0.12.2 -> v0.12.3
    Updating proc-macro2 v1.0.82 -> v1.0.84
    Updating r-efi v4.4.0 -> v4.5.0
    Updating serde v1.0.202 -> v1.0.203
    Updating serde_derive v1.0.202 -> v1.0.203
    Updating spanned v0.2.0 -> v0.2.1
    Updating syn v2.0.64 -> v2.0.66
    Updating tracing-tree v0.3.0 -> v0.3.1
note: pass `--verbose` to see 80 unchanged dependencies behind latest
```
…s, r=lcnr

Uplift `{Closure,Coroutine,CoroutineClosure}Args` and friends to `rustc_type_ir`

Part of converting the new solver's `structural_traits.rs` to be interner-agnostic.

I decided against aliasing `ClosureArgs<TyCtxt<'tcx>>` to `ClosureArgs<'tcx>` because it seemed so rare. I could do so if desired, though.

r? lcnr
…t, r=jieyouxu

Refactor `--print=check-cfg` test

*as asked in rust-lang#125818 (comment)

r? ````@jieyouxu````
…fix, r=onur-ozkan

include missing submodule on bootstrap

As of rust-lang#125408 PR, rustbook now relies on dependencies from the "src/doc/book" submodule.

However, bootstrap does not automatically sync this submodule before reading metadata informations. And if the submodule is not present, reading metadata will fail because rustbook's dependencies will be missing.

This change makes "src/doc/book" to be fetched/synced automatically before trying to read metadata.

cc `@Zalathar`
@rustbot rustbot added 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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) rollup A PR which is a rollup labels Jun 1, 2024
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=6

@bors
Copy link
Contributor

bors commented Jun 1, 2024

📌 Commit 76351df 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 1, 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)
Download action repository 'msys2/setup-msys2@v2.22.0' (SHA:cc11e9188b693c2b100158c3322424c4cc1dadea)
Download action repository 'actions/checkout@v4' (SHA:a5ac7e51b41094c92402da3b24376905380afc29)
Download action repository 'actions/setup-python@v5' (SHA:82c7e631bb3cdc910f68e0081d67478d79c6982d)
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
---

#9 [4/8] RUN sh /scripts/sccache.sh
#9 CACHED

#10 [6/8] RUN pip3 install --no-deps --no-cache-dir --require-hashes -r /tmp/reuse-requirements.txt     && pip3 install virtualenv

#11 [7/8] COPY host-x86_64/mingw-check/validate-toolstate.sh /scripts/
#11 CACHED

---
DirectMap4k:      178112 kB
DirectMap2M:     6113280 kB
DirectMap1G:    12582912 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/acaf0aeed0dfbfc4be9f996344e2c5f294cf5794/rust-dev-nightly-x86_64-unknown-linux-gnu.tar.xz
extracting /checkout/obj/build/cache/llvm-acaf0aeed0dfbfc4be9f996344e2c5f294cf5794-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.44s
##[endgroup]
fmt check
##[error]Diff in /checkout/compiler/rustc_lint/src/context.rs at line 487:
                 }
             },
             },
-            Some(Id(id)) => {
-                CheckLintNameResult::Tool(slice::from_ref(id), Some(complete_name))
-            }
+            Some(Id(id)) => CheckLintNameResult::Tool(slice::from_ref(id), Some(complete_name)),
             Some(other) => {
                 debug!("got renamed lint {:?}", other);
                 CheckLintNameResult::NoLint(None)
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/rustc_const_eval/src/check_consts/check.rs" "/checkout/compiler/rustc_const_eval/src/check_consts/ops.rs" "/checkout/compiler/rustc_feature/src/lib.rs" "/checkout/compiler/rustc_feature/src/unstable.rs" "/checkout/compiler/rustc_feature/src/accepted.rs" "/checkout/compiler/rustc_feature/src/removed.rs" "/checkout/compiler/rustc_feature/src/builtin_attrs.rs" "/checkout/compiler/rustc_feature/src/tests.rs" "/checkout/compiler/rustc_fs_util/src/lib.rs" "/checkout/compiler/rustc_parse/src/validate_attr.rs" "/checkout/compiler/rustc_parse/src/lib.rs" "/checkout/compiler/rustc_parse/src/errors.rs" "/checkout/compiler/rustc_parse/src/lexer/unescape_error_reporting.rs" "/checkout/compiler/rustc_parse/src/lexer/tokentrees.rs" "/checkout/compiler/rustc_parse/src/lexer/mod.rs" "/checkout/compiler/rustc_parse/src/lexer/diagnostics.rs" "/checkout/compiler/rustc_parse/src/lexer/unicode_chars.rs" "/checkout/compiler/rustc_parse/src/parser/nonterminal.rs" "/checkout/compiler/rustc_parse/src/parser/mod.rs" "/checkout/compiler/rustc_parse/src/parser/pat.rs" "/checkout/compiler/rustc_parse/src/parser/ty.rs" "/checkout/compiler/rustc_parse/src/parser/expr.rs" "/checkout/compiler/rustc_parse/src/parser/generics.rs" "/checkout/compiler/rustc_parse/src/parser/attr_wrapper.rs" "/checkout/compiler/rustc_parse/src/parser/attr.rs" "/checkout/compiler/rustc_parse/src/parser/mut_visit/tests.rs" "/checkout/compiler/rustc_parse/src/parser/tests.rs" "/checkout/compiler/rustc_parse/src/parser/stmt.rs" "/checkout/compiler/rustc_parse/src/parser/path.rs" "/checkout/compiler/rustc_parse/src/parser/diagnostics.rs" "/checkout/compiler/rustc_parse/src/parser/tokenstream/tests.rs" "/checkout/compiler/rustc_parse/src/parser/item.rs" "/checkout/compiler/rustc_lint/src/for_loops_over_fallibles.rs" "/checkout/compiler/rustc_lint/src/builtin.rs" "/checkout/compiler/rustc_lint/src/lib.rs" "/checkout/compiler/rustc_lint/src/traits.rs" "/checkout/compiler/rustc_lint/src/early.rs" "/checkout/compiler/rustc_lint/src/opaque_hidden_inferred_bound.rs" "/checkout/compiler/rustc_lint/src/passes.rs" "/checkout/compiler/rustc_lint/src/methods.rs" "/checkout/compiler/rustc_lint/src/non_ascii_idents.rs" "/checkout/compiler/rustc_lint/src/nonstandard_style.rs" "/checkout/compiler/rustc_lint/src/ptr_nulls.rs" "/checkout/compiler/rustc_lint/src/redundant_semicolon.rs" "/checkout/compiler/rustc_lint/src/types.rs" "/checkout/compiler/rustc_lint/src/hidden_unicode_codepoints.rs" "/checkout/compiler/rustc_lint/src/unused.rs" "/checkout/compiler/rustc_lint/src/noop_method_call.rs" "/checkout/compiler/rustc_lint/src/map_unit_fn.rs" "/checkout/compiler/rustc_lint/src/late.rs" "/checkout/compiler/rustc_lint/src/errors.rs" "/checkout/compiler/rustc_lint/src/context.rs" "/checkout/compiler/rustc_lint/src/levels.rs" "/checkout/compiler/rustc_lint/src/non_fmt_panic.rs" "/checkout/compiler/rustc_lint/src/tests.rs" "/checkout/compiler/rustc_lint/src/internal.rs" "/checkout/compiler/rustc_lint/src/foreign_modules.rs" "/checkout/compiler/rustc_lint/src/invalid_from_utf8.rs" "/checkout/compiler/rustc_lint/src/multiple_supertrait_upcastable.rs" "/checkout/compiler/rustc_lint/src/unit_bindings.rs" "/checkout/compiler/rustc_lint/src/deref_into_dyn_supertrait.rs" "/checkout/compiler/rustc_lint/src/pass_by_value.rs" "/checkout/compiler/rustc_lint/src/context/diagnostics.rs" "/checkout/compiler/rustc_const_eval/src/check_consts/qualifs.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: Sat Jun  1 14:48:55 UTC 2024
  network time: Sat, 01 Jun 2024 14:48:56 GMT
##[error]Process completed with exit code 1.
Post job cleanup.

@matthiaskrgr matthiaskrgr deleted the rollup-fdlq8ce branch September 1, 2024 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants