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

Closed
wants to merge 17 commits into from
Closed

Rollup of 7 pull requests #106319

wants to merge 17 commits into from

Conversation

jyn514
Copy link
Member

@jyn514 jyn514 commented Dec 31, 2022

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

maurer and others added 17 commits December 29, 2022 10:21
Monomorphise `#[repr(transparent)]` parameterized ADTs before turning
them into an Itanium mangled String.

`#[repr(transparent)]` ADTs currently use the single field to represent
them in their CFI type ID to ensure that they are compatible. However,
if that type involves a type parameter instantiated at the ADT level, as
in `ManuallyDrop`, this will currently ICE as the `Parameter` type
cannot be mangled. Since this happens at lowering time, it should always
be concrete after substitution.

Fixes rust-lang#106230
Previously, clean only supported `--stage 0` for specific crates.

The new `crate_description` function generates a string that looks
like
```
: {rustc_query_impl}
```
Before:
```
Testing ["rustc_interface"] stage0 (aarch64-unknown-linux-gnu -> aarch64-unknown-linux-gnu)
```

After:
```
Testing {rustc_interface} stage0 (aarch64-unknown-linux-gnu -> aarch64-unknown-linux-gnu)
```

Note there is a slight consistency between `build` and `test`: The
former doesn't print "compiler artifacts". It would be annoying to fix
and doesn't hurt anything, so I left it be.

```
; x t rustc_interface --stage 0 --dry-run
Testing {rustc_interface} stage0 (aarch64-unknown-linux-gnu -> aarch64-unknown-linux-gnu)
; x b rustc_interface --stage 0 --dry-run
Building {rustc_interface} stage0 compiler artifacts (aarch64-unknown-linux-gnu -> aarch64-unknown-linux-gnu)
```
This makes it easier to see them (and makes people go owo).
CFI: Monomorphize transparent ADTs before typeid

Monomorphise `#[repr(transparent)]` parameterized ADTs before turning them into an Itanium mangled String.

`#[repr(transparent)]` ADTs currently use the single field to represent them in their CFI type ID to ensure that they are compatible. However, if that type involves a type parameter instantiated at the ADT level, as in `ManuallyDrop`, this will currently ICE as the `Parameter` type cannot be mangled. Since this happens at lowering time, it should always be concrete after substitution.

Fixes rust-lang#106230
Merge multiple mutable borrows of immutable binding errors

Fix rust-lang#53466.
Make tidy errors red

This makes it easier to see them (and makes people go owo).

I also changes the error codes check to not print too many things and use `tidy_error`.

r? ``@jyn514``
…ples-layout-test, r=notriddle

Extend scraped examples layout GUI test for position of buttons

This is a regression test for rust-lang#106279.

r? ```@notriddle```
 bootstrap: Get rid of tail_args in stream_cargo

Based on rust-lang#106303 for convenience.

r? ```@Mark-Simulacrum```
Dont use `--merge-base` during bootstrap formatting subcommand

I use a development image with Ubuntu 20.04 LTS, which has git 2.25.

Recently, `./x.py test tidy --bless` regressed in rust-lang#105702 because it uses the `--merge-base` option on `diff-index`, which was only introduced in git 2.30 (git/git@0f5a1d4). Luckily, it can be replicated via two calls to `git merge-base` + `git diff-index`, so let's just use that.
Fix panic on `x build --help`

Fixes rust-lang#106313. This avoids trying to run `get_help` unless we actually need to see the paths that are available for the subcommand.

This originally regressed in rust-lang#106166.
@rustbot rustbot added T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) A-testsuite Area: The testsuite used to check the correctness of rustc 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. rollup A PR which is a rollup labels Dec 31, 2022
@jyn514
Copy link
Member Author

jyn514 commented Dec 31, 2022

@bors r+ p=9 rollup=never

(#106305 contains 2 other PRs in its history, #106271 and #106303)

@bors
Copy link
Contributor

bors commented Dec 31, 2022

📌 Commit b58e611 has been approved by jyn514

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 Dec 31, 2022
@bors
Copy link
Contributor

bors commented Dec 31, 2022

⌛ Testing commit b58e611 with merge 6d71e52e2ff3e0031141e63f8c0a161b28fcc075...

@bors
Copy link
Contributor

bors commented Dec 31, 2022

💔 Test failed - checks-actions

@bors bors added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Dec 31, 2022
@jyn514 jyn514 closed this Dec 31, 2022
@jyn514
Copy link
Member Author

jyn514 commented Dec 31, 2022

err hmm, that error looks like 4839886, not anything in this PR 🤔

thread '<unnamed>' panicked at 'Encountered error while testing Git status: "failed to execute git log command: fatal: ambiguous argument ':!src/tools/miri': unknown revision or path not in the working tree.\nUse '--' to separate paths from revisions, like this:\n'git <command> [<revision>...] -- [<file>...]'\n"', src/tools/tidy/src/no_merge.rs:23:25

@jyn514 jyn514 deleted the rollup-rljbts6 branch December 31, 2022 02:03
@jyn514 jyn514 restored the rollup-rljbts6 branch December 31, 2022 02:03
@jyn514 jyn514 reopened this Dec 31, 2022
@jyn514
Copy link
Member Author

jyn514 commented Dec 31, 2022

@bors r+

@bors
Copy link
Contributor

bors commented Dec 31, 2022

💡 This pull request was already approved, no need to approve it again.

@bors
Copy link
Contributor

bors commented Dec 31, 2022

📌 Commit b58e611 has been approved by jyn514

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Dec 31, 2022

🌲 The tree is currently closed for pull requests below priority 500. This pull request will be tested once the tree is reopened.

@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 Dec 31, 2022
@rust-log-analyzer
Copy link
Collaborator

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

Click to see the possible cause of the failure (guessed by this bot)
Checking which error codes lack tests...
Found 507 error codes
Found 0 error(s) in error codes
Done!
thread '<unnamed>' panicked at 'Encountered error while testing Git status: "failed to execute git log command: fatal: ambiguous argument ':!src/tools/miri': unknown revision or path not in the working tree.\nUse '--' to separate paths from revisions, like this:\n'git <command> [<revision>...] -- [<file>...]'\n"', src/tools/tidy/src/no_merge.rs:23:25
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Any { .. }', src/tools/tidy/src/main.rs:42:61
* 393 features
Build completed unsuccessfully in 0:00:26

@compiler-errors
Copy link
Member

@bors treeclosed-

@bors
Copy link
Contributor

bors commented Dec 31, 2022

⌛ Testing commit b58e611 with merge 5e5ef50482e13f2ef4bf67b24e22e6a0f95d3a82...

@bors
Copy link
Contributor

bors commented Dec 31, 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 Dec 31, 2022
@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)
Successfully built 5a08cdf9e358
Successfully tagged rust-ci:latest
Built container sha256:5a08cdf9e35838c811fcb40f00496779d127e0a67d5720e069463ab4a442001c
Uploading finished image to https://ci-caches.rust-lang.org/docker/58bd69d3781a382eb5941028d9596b84692bd50bf9ab53a2d16b350022deca32f83037b6d64da3bfdf69e2b275e0db2ddd3212390c690549c0b3382192828b45
upload failed: - to s3://rust-lang-ci-sccache2/docker/58bd69d3781a382eb5941028d9596b84692bd50bf9ab53a2d16b350022deca32f83037b6d64da3bfdf69e2b275e0db2ddd3212390c690549c0b3382192828b45 Unable to locate credentials
[CI_JOB_NAME=mingw-check-tidy]
[CI_JOB_NAME=mingw-check-tidy]
---
configure: rust.debug-assertions := True
configure: rust.overflow-checks := True
configure: llvm.assertions      := True
configure: dist.missing-tools   := True
configure: build.configure-args := ['--enable-sccache', '--disable-manage-submodu ...
configure: writing `config.toml` in current directory
configure: 
configure: run `python /checkout/x.py --help`
Attempting with retry: make prepare
---
tidy: Skipping binary file check, read-only filesystem
Checking which error codes lack tests...
* 633 error codes
* highest error code: E0791
thread '<unnamed>' panicked at 'Encountered error while testing Git status: "failed to execute git log command: fatal: ambiguous argument ':!src/tools/miri': unknown revision or path not in the working tree.\nUse '--' to separate paths from revisions, like this:\n'git <command> [<revision>...] -- [<file>...]'\n"', src/tools/tidy/src/no_merge.rs:23:25
Found 507 error codes
Found 0 error(s) in error codes
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Any { .. }', src/tools/tidy/src/main.rs:42:61
Done!

@rust-log-analyzer
Copy link
Collaborator

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

Click to see the possible cause of the failure (guessed by this bot)
diff of stderr:

25    |                        +++
26 
27 error[E0596]: cannot borrow `v` as mutable, as it is not declared as mutable
-   --> $DIR/type-check-2-2.rs:30:29
29    |
29    |
30 LL |         let v: Vec<u64> = vec![0, 1, 2];
-    |             - help: consider changing this to be mutable: `mut v`
+    |             |
+    |             not mutable
+    |             help: consider changing this to be mutable: `mut v`
+    |             help: consider changing this to be mutable: `mut v`
32 LL |         asm!("{}", in(reg) v[0]);
33 LL |         asm!("{}", out(reg) v[0]);
-    |                             ^ cannot borrow as mutable
- 
- error[E0596]: cannot borrow `v` as mutable, as it is not declared as mutable
-   --> $DIR/type-check-2-2.rs:32:31
-    |
- LL |         let v: Vec<u64> = vec![0, 1, 2];
-    |             - help: consider changing this to be mutable: `mut v`
+    |                             - cannot borrow as mutable
+ LL |
+ LL |
42 LL |         asm!("{}", inout(reg) v[0]);
-    |                               ^ cannot borrow as mutable
+    |                               - cannot borrow as mutable
- error: aborting due to 4 previous errors
+ error: aborting due to 3 previous errors
46 
47 Some errors have detailed explanations: E0381, E0596.
47 Some errors have detailed explanations: E0381, E0596.
48 For more information about an error, try `rustc --explain E0381`.


The actual stderr differed from the expected stderr.
Actual stderr saved to /checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/asm/aarch64/type-check-2-2/type-check-2-2.stderr
Some tests failed in compiletest suite=ui mode=ui host=aarch64-unknown-linux-gnu target=aarch64-unknown-linux-gnu
To only update this specific test, also pass `--test-args asm/aarch64/type-check-2-2.rs`

error: 1 errors occurred comparing output.
error: 1 errors occurred comparing output.
status: exit status: 1
command: "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/asm/aarch64/type-check-2-2.rs" "-Zthreads=1" "--target=aarch64-unknown-linux-gnu" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Zdeduplicate-diagnostics=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/asm/aarch64/type-check-2-2" "-A" "unused" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/asm/aarch64/type-check-2-2/auxiliary"
stdout: none
--- stderr -------------------------------
error[E0381]: used binding `x` isn't initialized
   |
LL |         let x: u64;
   |             - binding declared here but left uninitialized
   |             - binding declared here but left uninitialized
LL |         asm!("{}", in(reg) x);
   |                            ^ `x` used here but it isn't initialized
help: consider assigning a value
   |
LL |         let x: u64 = 0;
   |                    +++
   |                    +++

error[E0381]: used binding `y` isn't initialized
   |
LL |         let mut y: u64;
LL |         let mut y: u64;
   |             ----- binding declared here but left uninitialized
LL |         asm!("{}", inout(reg) y);
   |         ^^^^^^^^^^^^^^^^^^^^^^^^ `y` used here but it isn't initialized
help: consider assigning a value
   |
LL |         let mut y: u64 = 0;
   |                        +++
   |                        +++

error[E0596]: cannot borrow `v` as mutable, as it is not declared as mutable
   |
   |
LL |         let v: Vec<u64> = vec![0, 1, 2];
   |             |
   |             not mutable
   |             help: consider changing this to be mutable: `mut v`
   |             help: consider changing this to be mutable: `mut v`
LL |         asm!("{}", in(reg) v[0]);
LL |         asm!("{}", out(reg) v[0]);
   |                             - cannot borrow as mutable
LL |         //~^ ERROR cannot borrow `v` as mutable, as it is not declared as mutable
LL |         asm!("{}", inout(reg) v[0]);
   |                               - cannot borrow as mutable
error: aborting due to 3 previous errors

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

@bors
Copy link
Contributor

bors commented Dec 31, 2022

☔ The latest upstream changes (presumably #106245) made this pull request unmergeable. Please resolve the merge conflicts.

@jyn514 jyn514 closed this Dec 31, 2022
@jyn514 jyn514 deleted the rollup-rljbts6 branch December 31, 2022 14:15
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Oct 16, 2023
Enable triagebot no-merges check

Follow-up on rust-lang/triagebot#1704

### Motivation

Occasionally, a merge commit like rust-lang@cb5c011 makes it past manual review and gets merged into master.

At one point, we tried adding a check to CI to prevent this from happening (rust-lang#105058), but that ended up [problematic](rust-lang#106319 (comment)) and was [reverted](rust-lang#106320). This kind of check is simply too fragile for CI, and there must be a way for a human to override the bot's decision.

The capability to detect and warn about merge commits has been present in triagebot for quite some time, but was never enabled at rust-lang/rust, possibly due to concerns about false positives on rollup and subtree sync PRs. This PR intends to alleviate those concerns.

### Configuration

This configuration will exclude rollup PRs and subtree sync PRs from merge commit detection, and it will post the default warning message and add the `has-merge-commits` and `S-waiting-on-author` labels when merge commits are detected on other PRs.

The eventual vision is to have bors refuse to merge if the `has-merge-commits` label is present. A reviewer can still force the merge by removing that label if they so wish.

### Note for contributors

The rollup tool should add that label automatically, but anyone performing subtree updates should begin including "subtree update" in the titles of those PRs, to avoid false positives.

r? infra

## Open Questions

1. This configuration uses the default message that's built into triagebot:

> There are merge commits (commits with multiple parents) in your changes. We have a [no merge policy](https://rustc-dev-guide.rust-lang.org/git.html#no-merge-policy) so these commits will need to be removed for this pull request to be merged.
>
> You can start a rebase with the following commands:
> ```shell-session
> $ # rebase
> $ git rebase -i master
> $ # delete any merge commits in the editor that appears
> $ git push --force-with-lease
> ```

Any changes to this are easy, I'll just have to add a `message` option. Should we mention the excluded titles in the message?
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Oct 16, 2023
Rollup merge of rust-lang#114157 - pitaj:triagebot_no-merges, r=ehuss

Enable triagebot no-merges check

Follow-up on rust-lang/triagebot#1704

### Motivation

Occasionally, a merge commit like rust-lang@cb5c011 makes it past manual review and gets merged into master.

At one point, we tried adding a check to CI to prevent this from happening (rust-lang#105058), but that ended up [problematic](rust-lang#106319 (comment)) and was [reverted](rust-lang#106320). This kind of check is simply too fragile for CI, and there must be a way for a human to override the bot's decision.

The capability to detect and warn about merge commits has been present in triagebot for quite some time, but was never enabled at rust-lang/rust, possibly due to concerns about false positives on rollup and subtree sync PRs. This PR intends to alleviate those concerns.

### Configuration

This configuration will exclude rollup PRs and subtree sync PRs from merge commit detection, and it will post the default warning message and add the `has-merge-commits` and `S-waiting-on-author` labels when merge commits are detected on other PRs.

The eventual vision is to have bors refuse to merge if the `has-merge-commits` label is present. A reviewer can still force the merge by removing that label if they so wish.

### Note for contributors

The rollup tool should add that label automatically, but anyone performing subtree updates should begin including "subtree update" in the titles of those PRs, to avoid false positives.

r? infra

## Open Questions

1. This configuration uses the default message that's built into triagebot:

> There are merge commits (commits with multiple parents) in your changes. We have a [no merge policy](https://rustc-dev-guide.rust-lang.org/git.html#no-merge-policy) so these commits will need to be removed for this pull request to be merged.
>
> You can start a rebase with the following commands:
> ```shell-session
> $ # rebase
> $ git rebase -i master
> $ # delete any merge commits in the editor that appears
> $ git push --force-with-lease
> ```

Any changes to this are easy, I'll just have to add a `message` option. Should we mention the excluded titles in the message?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc rollup A PR which is a rollup 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-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.

9 participants