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

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

fmease and others added 16 commits February 13, 2024 05:06
`compile_fail` should only be used when the code is meant to show
what *not* to do. In other words, there should be a fundamental flaw
in the code. However, in this case, the example is just incomplete,
so we should use `ignore` to avoid confusing readers.
… r=lcnr

Check normalized call signature for WF in mir typeck

Unfortunately we don't check that the built-in implementations for `Fn*` traits are actually well-formed in the same way that we do for user-provided impls.

Essentially, when checking a call terminator, we end up with a signature that references an unnormalized `<[closure] as FnOnce<...>>::Output` in its output. That output type, due to the built-in impl, doesn't follow the expected rule that `WF(ty)` implies `WF(normalized(ty))`. We fix this by also checking the normalized signature here.

**See** boxy's detailed and useful explanation comment which explains this in more detail: rust-lang#114936 (comment)

Fixes rust-lang#114936
Fixes rust-lang#118876

r? types
cc `@BoxyUwU` `@lcnr`
…ram, r=notriddle

rustdoc: replace `clean::InstantiationParam` with `clean::GenericArg`

Probably better known as `SubstParam` (until rust-lang#120958 which should've probably renamed it to `InstantiatedParam` but anyways).

It doesn't make any sense to me why it should exist as a separate type. `GenericArg` is exactly what we want here anyways from a semantic perspective. Both have the same size btw.

I also took the liberty of doing some drive-by cleanups.
remove unnecessary calls to `commit_if_ok`

we propagate the error outwards, so anything which wants to discard the error should do so itself.

r? types
…ion, r=jsha

Remove jsha from the rustdoc review rotation

As discussed
r? `@jsha`
add lcnr to the compiler-team assignment group
Fix two UI tests with incorrect directive / invalid revision

- `tests/ui/asm/inline-syntax` had a `ui_test`-style directive on compiletest: `//`@run-rustfix`.`
- `tests/ui/asm/inline-syntax.rs` has directives for a undeclared revision `[x86_64_allowed]` which seems to have the same directives as declared revision `[x86_64]`.
… r=Nilstrieb

Fix incorrect use of `compile_fail`

`compile_fail` should only be used when the code is meant to show what *not* to do. In other words, there should be a fundamental flaw in the code. However, in this case, the example is just incomplete, so we should use `ignore` to avoid confusing readers.
Do not assemble candidates for default impls

There is no reason (as far as I can tell?) that we should assemble an impl candidate for a default impl. This candidate itself does not prove that the impl holds, and any time that it *does* hold, there will be a more specializing non-default impl that also is assembled.

This is because `default impl<T> Foo for T {}` actually expands to `impl<T> Foo for T where T: Foo {}`. The only way to satisfy that where clause (without coinduction) is via *another* implementation that does hold -- precisely an impl that specializes it.

This should fix the specialization related regressions for rust-lang#116494. That should lead to one root crate regression that doesn't have to do with specialization, which I think we can regress.

r? lcnr cc `@rust-lang/types`

cc rust-lang#31844
@rustbot rustbot added A-meta Area: Issues about the rust-lang/rust repository. 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-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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative rollup A PR which is a rollup labels Feb 13, 2024
@matthiaskrgr
Copy link
Member Author

@bors r rollup=never p=8

@bors
Copy link
Contributor

bors commented Feb 13, 2024

📌 Commit d879ba1 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 Feb 13, 2024
@bors
Copy link
Contributor

bors commented Feb 13, 2024

⌛ Testing commit d879ba1 with merge e9a16fd...

bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 13, 2024
…iaskrgr

Rollup of 8 pull requests

Successful merges:

 - rust-lang#118882 (Check normalized call signature for WF in mir typeck)
 - rust-lang#120999 (rustdoc: replace `clean::InstantiationParam` with `clean::GenericArg`)
 - rust-lang#121002 (remove unnecessary calls to `commit_if_ok`)
 - rust-lang#121005 (Remove jsha from the rustdoc review rotation)
 - rust-lang#121043 (add lcnr to the compiler-team assignment group)
 - rust-lang#121045 (Fix two UI tests with incorrect directive / invalid revision)
 - rust-lang#121046 (Fix incorrect use of `compile_fail`)
 - rust-lang#121047 (Do not assemble candidates for default impls)

r? `@ghost`
`@rustbot` modify labels: rollup
@rust-log-analyzer
Copy link
Collaborator

The job dist-i586-gnu-i586-i686-musl failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
17 error: unknown directive
-   --> $DIR/inline-syntax.rs:38:15
    --> $DIR/inline-syntax.rs:35:15
19    |
20 LL |         asm!(".intel_syntax noprefix", "nop");

27    |     ^
28 
29 error: unknown directive
29 error: unknown directive
-   --> $DIR/inline-syntax.rs:42:15
    --> $DIR/inline-syntax.rs:39:15
31    |
32 LL |         asm!(".intel_syntax aaa noprefix", "nop");

39    |     ^
40 
41 error: unknown directive
41 error: unknown directive
-   --> $DIR/inline-syntax.rs:46:15
    --> $DIR/inline-syntax.rs:43:15
43    |
44 LL |         asm!(".att_syntax noprefix", "nop");

51    |     ^
52 
53 error: unknown directive
53 error: unknown directive
-   --> $DIR/inline-syntax.rs:50:15
    --> $DIR/inline-syntax.rs:47:15
55    |
56 LL |         asm!(".att_syntax bbb noprefix", "nop");

63    |     ^
64 
65 error: unknown directive
65 error: unknown directive
-   --> $DIR/inline-syntax.rs:54:15
    --> $DIR/inline-syntax.rs:51:15
67    |
68 LL |         asm!(".intel_syntax noprefix; nop");

75    |     ^
76 
77 error: unknown directive
---
81    |             ^


The actual stderr differed from the expected stderr.
Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/asm/inline-syntax.arm_llvm_18/inline-syntax.arm_llvm_18.stderr
To only update this specific test, also pass `--test-args asm/inline-syntax.rs`


error in revision `arm_llvm_18`: 1 errors occurred comparing output.
status: exit status: 1
command: RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/asm/inline-syntax.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--cfg" "arm_llvm_18" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/asm/inline-syntax.arm_llvm_18" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/i586-unknown-linux-gnu/native/rust-test-helpers" "-Clinker=i586-unknown-linux-gnu-gcc" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/asm/inline-syntax.arm_llvm_18/auxiliary" "--target" "armv7-unknown-linux-gnueabihf"
--- stderr -------------------------------
error: unknown directive
   |
note: instantiated into assembly here
note: instantiated into assembly here
  --> <inline asm>:1:1
   |
LL | .intel_syntax noprefix

error: unknown directive
   |
note: instantiated into assembly here
note: instantiated into assembly here
  --> <inline asm>:1:1
   |
LL | .intel_syntax noprefix

error: unknown directive
##[error]  --> /checkout/tests/ui/asm/inline-syntax.rs:35:15
   |
   |
LL |         asm!(".intel_syntax noprefix", "nop");
   |
note: instantiated into assembly here
note: instantiated into assembly here
  --> <inline asm>:1:2
LL |     .intel_syntax noprefix
   |     ^

error: unknown directive
error: unknown directive
##[error]  --> /checkout/tests/ui/asm/inline-syntax.rs:39:15
   |
LL |         asm!(".intel_syntax aaa noprefix", "nop");
   |
note: instantiated into assembly here
note: instantiated into assembly here
  --> <inline asm>:1:2
   |
LL |     .intel_syntax aaa noprefix

error: unknown directive
##[error]  --> /checkout/tests/ui/asm/inline-syntax.rs:43:15
   |
   |
LL |         asm!(".att_syntax noprefix", "nop");
   |
note: instantiated into assembly here
note: instantiated into assembly here
  --> <inline asm>:1:2
   |
LL |     .att_syntax noprefix

error: unknown directive
##[error]  --> /checkout/tests/ui/asm/inline-syntax.rs:47:15
   |
   |
LL |         asm!(".att_syntax bbb noprefix", "nop");
   |
note: instantiated into assembly here
note: instantiated into assembly here
  --> <inline asm>:1:2
   |
LL |     .att_syntax bbb noprefix

error: unknown directive
##[error]  --> /checkout/tests/ui/asm/inline-syntax.rs:51:15
   |
   |
LL |         asm!(".intel_syntax noprefix; nop");
   |
note: instantiated into assembly here
note: instantiated into assembly here
  --> <inline asm>:1:2
   |
LL |     .intel_syntax noprefix; nop

error: unknown directive
##[error]  --> /checkout/tests/ui/asm/inline-syntax.rs:58:13
   |
   |
LL |             .intel_syntax noprefix
   |             ^
   |
note: instantiated into assembly here
  --> <inline asm>:2:13
LL |             .intel_syntax noprefix
   |             ^

error: aborting due to 8 previous errors

@bors
Copy link
Contributor

bors commented Feb 13, 2024

💔 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 Feb 13, 2024
@matthiaskrgr matthiaskrgr deleted the rollup-k3fuez5 branch March 16, 2024 18:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-meta Area: Issues about the rust-lang/rust repository. 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-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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants