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 8 pull requests #99159

Closed
wants to merge 20 commits into from

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

danobi and others added 20 commits July 8, 2022 21:03
Before, there was more or less duplicated suggestions to add type hints.
Fix by clearing more generic suggestions when a more specific suggestion
is possible.

This fixes rust-lang#93506 .
In practice, this doesn't matter very much because the script takes ~no time to run.
But this makes `CARGO_LOG=info` easier to read, and theoretically saves a few milliseconds.
Support `-A`, `-W`, `-D` and `-F` when running `./x.py clippy`

Resolves rust-lang#97059

This PR adds support for `-A`, `-W`, `-D` and `-F` when running `./x.py clippy`.
…non_exhaustive, r=oli-obk

check non_exhaustive attr and private fields for transparent types

Fixes rust-lang#78586.
…, r=jyn514

Fix rustdoc help options

Fixes rust-lang#98976.

Since you're the one who found out about the problem and also provided the solution (thanks for both!):

r? `@jyn514`
…henkov

Fix duplicated type annotation suggestion

Before, there was more or less duplicated suggestions to add type hints.
Fix by clearing more generic suggestions when a more specific suggestion
is possible.

This fixes rust-lang#93506 .
Fix sized check ICE in asm check

Fixes (beta nominated, so doesn't close) rust-lang#99122
…ne-crate-attributes, r=GuillaumeGomez

fix(doctest): treat fatal parse errors as incomplete attributes

Fixes rust-lang#99089
…esleywiser

Don't rerun the build script for the compiler each time on non-windows platforms

In practice, this doesn't matter very much because the script takes ~no time to run.
But this makes `CARGO_LOG=info` easier to read, and theoretically saves a few milliseconds.
Do not error during method probe on `Sized` predicates for types that aren't the method receiver

Fixes rust-lang#61525

This is safe even though we're skipping an error because we end up confirming the method, which means we're still checking the `Sized` predicate in the end. It just means that we don't emit an erroneous message as below:

```
error: the `query` method cannot be invoked on a trait object
  --> src/lib.rs:14:11
   |
14 |         1.query::<dyn ToString>("")
   |           ^^^^^
   |
   = note: another candidate was found in the following trait, perhaps add a `use` for it:
           `use crate::Example;`
```

Also fixes erroneously suggesting the same trait over again, as seen in the `issue-35976.rs` UI test.
@rustbot rustbot added T-compiler Relevant to the compiler 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 Jul 11, 2022
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=10

@bors
Copy link
Contributor

bors commented Jul 11, 2022

📌 Commit 807a75a 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 Jul 11, 2022
@bors
Copy link
Contributor

bors commented Jul 11, 2022

⌛ Testing commit 807a75a with merge ddaa123aa9122a464465601e8f2d379293f427c8...

@rust-log-analyzer
Copy link
Collaborator

The job test-various failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
---- [ui] src/test/ui/asm/issue-99122-2.rs stdout ----

error: test compilation failed although it shouldn't!
status: exit status: 1
command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/asm/issue-99122-2.rs" "-Zthreads=1" "--target=wasm32-unknown-unknown" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Cstrip=debuginfo" "--emit" "metadata" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/asm/issue-99122-2" "-A" "unused" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/wasm32-unknown-unknown/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/asm/issue-99122-2/auxiliary"
stdout: none
--- stderr -------------------------------
error[E0658]: inline assembly is not stable yet on this architecture
   |
LL | /     core::arch::asm!(
LL | |         "nop",
LL | |         "nop",
LL | |         in("eax") pointer,
LL | |     );
   |
   = note: see issue #93335 <https://github.com/rust-lang/rust/issues/93335> for more information
   = note: see issue #93335 <https://github.com/rust-lang/rust/issues/93335> for more information
   = help: add `#![feature(asm_experimental_arch)]` to the crate attributes to enable

error: invalid register `eax`: unknown register
   |
   |
LL |         in("eax") pointer,

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0658`.
For more information about this error, try `rustc --explain E0658`.
------------------------------------------


---- [ui] src/test/ui/asm/issue-99122.rs stdout ----
diff of stderr:

+ error[E0658]: inline assembly is not stable yet on this architecture
+    |
+ LL | /     core::arch::asm!(
+ LL | /     core::arch::asm!(
+ LL | |         "nop",
+ LL | |         in("eax") pointer,
+ LL | |     );
+    |
+    = note: see issue #93335 <https://github.com/rust-lang/rust/issues/93335> for more information
+    = note: see issue #93335 <https://github.com/rust-lang/rust/issues/93335> for more information
+    = help: add `#![feature(asm_experimental_arch)]` to the crate attributes to enable
+ 
+ error: invalid register `eax`: unknown register
+    |
+    |
+ LL |         in("eax") pointer,
+ 
1 error[E0641]: cannot cast to a pointer of an unknown kind
2   --> $DIR/issue-99122.rs:2:27
3    |
3    |

6    |
7    = note: the type information given here is insufficient to check whether the pointer cast is valid
- error: aborting due to previous error
+ error: aborting due to 3 previous errors
10 
- For more information about this error, try `rustc --explain E0641`.
---
To only update this specific test, also pass `--test-args asm/issue-99122.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/asm/issue-99122.rs" "-Zthreads=1" "--target=wasm32-unknown-unknown" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Cstrip=debuginfo" "--emit" "metadata" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/asm/issue-99122" "-A" "unused" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/wasm32-unknown-unknown/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/asm/issue-99122/auxiliary"
stdout: none
--- stderr -------------------------------
error[E0658]: inline assembly is not stable yet on this architecture
   |
LL | /     core::arch::asm!(
LL | |         "nop",
LL | |         "nop",
LL | |         in("eax") pointer,
LL | |     );
   |
   = note: see issue #93335 <https://github.com/rust-lang/rust/issues/93335> for more information
   = note: see issue #93335 <https://github.com/rust-lang/rust/issues/93335> for more information
   = help: add `#![feature(asm_experimental_arch)]` to the crate attributes to enable

error: invalid register `eax`: unknown register
   |
   |
LL |         in("eax") pointer,

error[E0641]: cannot cast to a pointer of an unknown kind
  --> /checkout/src/test/ui/asm/issue-99122.rs:2:27
   |
   |
LL |     let pointer = 1u32 as *const _;
   |                           ^^^^^^^^ needs more type information
   |
   = note: the type information given here is insufficient to check whether the pointer cast is valid
error: aborting due to 3 previous errors

Some errors have detailed explanations: E0641, E0658.
For more information about an error, try `rustc --explain E0641`.

@bors
Copy link
Contributor

bors commented Jul 11, 2022

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jul 11, 2022
@matthiaskrgr matthiaskrgr deleted the rollup-03d7mvd branch July 30, 2022 10:32
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-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler 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.