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 #103207

Closed
wants to merge 15 commits into from

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

tspiteri and others added 15 commits September 27, 2022 17:31
The two rules within it can and should be done without the separate
media query:

  * There ain't no rule saying a viewport can't be `700.5px` wide, since
    hardware pixels can be finer than CSS pixels.

  * The rule for the first example-wrap child should probably apply
    on mobile.

  * The rule for the source sidebar is overriden by the mobile rule
    setting `max-width: 100vw`, so it can be merged with the rest
    of the styles.
Since it's possible to have a 700.5px viewport width, the JS needs to not
switch to mobile mode in such a setup.
…u-se

doc: rewrite doc for uint::{carrying_add,borrowing_sub}

Reword the documentation for bigint helper methods `uint::{carrying_add,borrowing_sub}` (rust-lang#85532).

The examples were also rewritten to demonstrate how the methods can be used in bignum arithmetic. No loops are used in the examples, but the variable names were chosen to include indices so that it is clear how this can be used in a loop if required.

Also, previously `carrying_add` had an example to say that if the input carry is false, the method is equivalent to `overflowing_add`. While the note was kept, the example was removed and an extra note was added to make sure this equivalence is not assumed for signed integers as well.
…r=m-ou-se

More slice::partition_point examples

After seeing the discussion of `binary_search` vs `partition_point` in rust-lang#101999, I thought some more example code could be helpful.
…h, r=GuillaumeGomez

rustdoc: remove CSS `@media (min-width: 701px)`

The two rules within it can and should be done without the separate media query:

  * There ain't no rule saying a viewport can't be `700.5px` wide, since hardware pixels can be finer than CSS pixels.

    <details><summary>Screenshot</summary>

    ![image](https://user-images.githubusercontent.com/1593513/196283804-e946fbe3-d914-4819-ba2d-b4a6a07f190a.png)

    </details>

  * The rule for the first example-wrap child should probably apply on mobile.

    <details><summary>Screenshots</summary>

    ## Before

    ![rustdoc-before](https://user-images.githubusercontent.com/1593513/196282813-88b861c7-7b05-4de5-a421-914396f86a04.png)

    ## After

    ![rustdoc-after](https://user-images.githubusercontent.com/1593513/196282842-e57760c2-72d5-4dad-94f5-1d7175043326.png)

    </details>

  * The rule for the source sidebar is overriden by the mobile rule setting `max-width: 100vw`, so it can be merged with the rest of the styles.
…int, r=davidtwco

Fix the bug of next_point in source_map

There is a bug in `next_point`, the new span won't move to next position when be called in the first time.

For this reason, our current code is working like this:
1. When we really want to move to the next position, we called two times of `next_point`
2. Some code which use `next_point` actually done the same thing with `shrink_to_hi`

This fix make sure when `next_point` is called, span will move with the width at least 1, and also work correctly in the scenario of multiple bytes.

Ref: rust-lang#103140 (comment)

r? `@davidtwco`
… r=notriddle

Clean up code-color and headers-color rustdoc GUI tests

r? `@notriddle`
…ondition, r=Amanieu

Retrieve LLVM version from llvm-filecheck binary if it is not set yet

In `rustc_codegen_gcc`, we run the `ASM` test suite. The problem is that, if a too recent version of the `llvm-filecheck` binary is provided, an extra argument needs to be passed and the to detect this version, it currently only expects a `--llvm-version` argument. With this, the version can be determined directly from the `llvm-filecheck` binary.

r? `@Amanieu`
@rustbot rustbot added 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. rollup A PR which is a rollup labels Oct 18, 2022
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=7

@bors
Copy link
Contributor

bors commented Oct 18, 2022

📌 Commit 665f8a3 has been approved by matthiaskrgr

It is now in the queue for this repository.

@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Oct 18, 2022
@rust-log-analyzer
Copy link
Collaborator

The job x86_64-gnu-tools failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
  IMAGE: x86_64-gnu-tools
##[endgroup]
From https://github.com/rust-lang/rust
 * branch              master     -> FETCH_HEAD
Searching for toolstate changes between e94827e5b09b5b098ea10d0c57a84892fc73b5a7 and 28ee5b3abfd56e4e198892485dc47b41c5944d83
Rustdoc was updated
##[group]Run src/ci/scripts/verify-channel.sh
src/ci/scripts/verify-channel.sh
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
env:
---

---- compile_test stdout ----
diff of stderr:

 error: use of `#[inline]` on trait method `default_inline` which has no body
    |
 LL |       #[inline]
    |  _____-^^^^^^^^
 LL | |     fn default_inline();
 LL | |     fn default_inline();
-   | |____- help: remove
+   | |___- help: remove
    |
    = note: `-D clippy::inline-fn-without-body` implied by `-D warnings`
 
 
 error: use of `#[inline]` on trait method `always_inline` which has no body
    |
    |
 LL |       #[inline(always)]
    |  _____-^^^^^^^^^^^^^^^^
 LL | |     fn always_inline();
-   | |____- help: remove
+   | |___- help: remove
 
 error: use of `#[inline]` on trait method `never_inline` which has no body
    |
    |
 LL |       #[inline(never)]
    |  _____-^^^^^^^^^^^^^^^
 LL | |     fn never_inline();
-   | |____- help: remove
+   | |___- help: remove
 error: aborting due to 3 previous errors
 
 


The actual stderr differed from the expected stderr.
Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/test/ui/inline_fn_without_body.stage-id.stderr
diff of fixed:

 // run-rustfix
 
 #![warn(clippy::inline_fn_without_body)]
 #![allow(clippy::inline_always)]
 trait Foo {
-    fn default_inline();
+     fn default_inline();
 
---
 
 fn main() {}
 

The actual fixed differed from the expected fixed.
Actual fixed saved to /checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/test/ui/inline_fn_without_body.stage-id.fixed
To only update this specific test, also pass `--test-args inline_fn_without_body.rs`

error: 2 errors occurred comparing output.
status: exit status: 1
status: exit status: 1
command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/clippy-driver" "tests/ui/inline_fn_without_body.rs" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/test/ui" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/test/ui/inline_fn_without_body.stage-id" "-A" "unused" "--emit=metadata" "-Dwarnings" "-Zui-testing" "-L" "dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps" "-L" "dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/release/deps" "--extern" "clippy_lints=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_lints-2d976feacb0a3a74.rlib" "--extern" "tokio=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libtokio-e0524b7e2611e851.rlib" "--extern" "itertools=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libitertools-cdd893c121eb00e4.rlib" "--extern" "quote=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libquote-b9c731f380466bd0.rlib" "--extern" "if_chain=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libif_chain-03f75cdc6d4d3afc.rlib" "--extern" "clippy_utils=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_utils-7c8630ac629d3fc3.rlib" "--extern" "serde_derive=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/release/deps/libserde_derive-1d810f37163c3a29.so" "--extern" "parking_lot=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libparking_lot-4554cde6a1339e03.rlib" "--extern" "derive_new=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/release/deps/libderive_new-97618c8d1e1f91be.so" "--extern" "regex=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libregex-619ac20e364f2b2c.rlib" "--extern" "futures=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libfutures-3ef490519219f110.rlib" "--extern" "syn=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libsyn-e95902f0f3ef680a.rlib" "--extern" "rustc_semver=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/librustc_semver-963bbd3f89834643.rlib" "--extern" "serde=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libserde-a77f10b259c274fa.rlib" "--edition=2021" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/test/ui/inline_fn_without_body.stage-id.aux"
------------------------------------------

------------------------------------------
stderr:
stderr:
------------------------------------------
{"message":"use of `#[inline]` on trait method `default_inline` which has no body","code":{"code":"clippy::inline_fn_without_body","explanation":null},"level":"error","spans":[{"file_name":"tests/ui/inline_fn_without_body.rs","byte_start":107,"byte_end":116,"line_start":7,"line_end":7,"column_start":5,"column_end":14,"is_primary":true,"text":[{"text":"    #[inline]","highlight_start":5,"highlight_end":14}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"`-D clippy::inline-fn-without-body` implied by `-D warnings`","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"remove","code":null,"level":"help","spans":[{"file_name":"tests/ui/inline_fn_without_body.rs","byte_start":107,"byte_end":120,"line_start":7,"line_end":8,"column_start":5,"column_end":4,"is_primary":true,"text":[{"text":"    #[inline]","highlight_start":5,"highlight_end":14},{"text":"    fn default_inline();","highlight_start":1,"highlight_end":4}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: use of `#[inline]` on trait method `default_inline` which has no body\n  --> tests/ui/inline_fn_without_body.rs:7:5\n   |\nLL |       #[inline]\n   |  _____-^^^^^^^^\nLL | |     fn default_inline();\n   | |___- help: remove\n   |\n   = note: `-D clippy::inline-fn-without-body` implied by `-D warnings`\n\n"}
{"message":"use of `#[inline]` on trait method `always_inline` which has no body","code":{"code":"clippy::inline_fn_without_body","explanation":null},"level":"error","spans":[{"file_name":"tests/ui/inline_fn_without_body.rs","byte_start":147,"byte_end":164,"line_start":10,"line_end":10,"column_start":5,"column_end":22,"is_primary":true,"text":[{"text":"    #[inline(always)]","highlight_start":5,"highlight_end":22}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"remove","code":null,"level":"help","spans":[{"file_name":"tests/ui/inline_fn_without_body.rs","byte_start":147,"byte_end":168,"line_start":10,"line_end":11,"column_start":5,"column_end":4,"is_primary":true,"text":[{"text":"    #[inline(always)]","highlight_start":5,"highlight_end":22},{"text":"    fn always_inline();","highlight_start":1,"highlight_end":4}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: use of `#[inline]` on trait method `always_inline` which has no body\n  --> tests/ui/inline_fn_without_body.rs:10:5\n   |\nLL |       #[inline(always)]\n   |  _____-^^^^^^^^^^^^^^^^\nLL | |     fn always_inline();\n   | |___- help: remove\n\n"}
{"message":"use of `#[inline]` on trait method `never_inline` which has no body","code":{"code":"clippy::inline_fn_without_body","explanation":null},"level":"error","spans":[{"file_name":"tests/ui/inline_fn_without_body.rs","byte_start":194,"byte_end":210,"line_start":13,"line_end":13,"column_start":5,"column_end":21,"is_primary":true,"text":[{"text":"    #[inline(never)]","highlight_start":5,"highlight_end":21}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"remove","code":null,"level":"help","spans":[{"file_name":"tests/ui/inline_fn_without_body.rs","byte_start":194,"byte_end":214,"line_start":13,"line_end":14,"column_start":5,"column_end":4,"is_primary":true,"text":[{"text":"    #[inline(never)]","highlight_start":5,"highlight_end":21},{"text":"    fn never_inline();","highlight_start":1,"highlight_end":4}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: use of `#[inline]` on trait method `never_inline` which has no body\n  --> tests/ui/inline_fn_without_body.rs:13:5\n   |\nLL |       #[inline(never)]\n   |  _____-^^^^^^^^^^^^^^^\nLL | |     fn never_inline();\n   | |___- help: remove\n\n"}

------------------------------------------

thread 'compile_test' panicked at 'Some tests failed', /cargo/registry/src/github.com-1ecc6299db9ec823/compiletest_rs-0.9.0/src/lib.rs:111:22

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-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
None yet
Development

Successfully merging this pull request may close these issues.

10 participants