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

Closed
wants to merge 28 commits into from

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

GilShoshan94 and others added 28 commits May 3, 2023 15:47
This is not a library, so there's no reason for them to be `pub`.
Without doing this, compiling the test crates causes private dep
lint errors:

      error: type `PathBuf` from private dependency 'std' in public interface
        --> library/std/tests/common/mod.rs:26:5
         |
      26 |     pub fn join(&self, path: &str) -> PathBuf {
         |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
         |
         = note: `-D exported-private-dependencies` implied by `-D warnings`

      error: type `Path` from private dependency 'std' in public interface
        --> library/std/tests/common/mod.rs:31:5
         |
      31 |     pub fn path(&self) -> &Path {
         |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^

      error: could not compile `std` (test "create_dir_all_bare") due to 2 previous errors

This happens because Cargo passes `--extern 'priv:std=...` when
compiling the test crate.

I'm not sure if these warnings are desirable or not. They seem correct
in a very pedantic way (the dependency on `std` is not marked public,
since it's implicit), but also pointless (the test crate is not an API,
so who cares what it does).
This switches to using a `Cell` for single-threaded rustc.
Compiletest was switched to querying all targets using
`--print=all-target-specs-json` and `--print=target-spec-json`
in rust-lang#108905. This unintentionally prevented codegen flags like `-Cpanic`
from being reflected in the current target configuration. This change
gets the current compiletest target config using `--print=cfg` like it
was previously while still using the faster prints for getting
information on all other targets.

Fixes rust-lang#110850.
Rework handling of recursive panics

This PR makes 2 changes to how recursive panics works (a panic while handling a panic).

1. The panic count is no longer used to determine whether to force an immediate abort. This allows code like the following to work without aborting the process immediately:

```rust
struct Double;

impl Drop for Double {
    fn drop(&mut self) {
        // 2 panics are active at once, but this is fine since it is caught.
        std::panic::catch_unwind(|| panic!("twice"));
    }
}

let _d = Double;

panic!("once");
```

Rustc already generates appropriate code so that any exceptions escaping out of a `Drop` called in the unwind path will immediately abort the process.

2. Any panics while the panic hook is executing will force an immediate abort. This is necessary to avoid potential deadlocks like rust-lang#110771 where a panic happens while holding the backtrace lock. We don't even try to print the panic message in this case since the panic may have been caused by `Display` impls.

Fixes rust-lang#110771
…e-dep-trait-impl-suggestions, r=cjgillot

diagnostics: exclude indirect private deps from trait impl suggest

Fixes rust-lang#88696
…error, r=dtolnay

Remove unnecessary Send bound

Hi,

While working on a [PR on Tokio](tokio-rs/tokio#5666), I took inspiration from the std channel mpsc and stumbled on a `Send` bound for a `Error` impl.

Tokio's maintainer `@Darksonn` pointed out to me that `Error` used to required the `Send` bound long time ago (here rust-lang#23541).

In the meantime, the `Send` bound `Error` got removed (see rust-lang#21312 and rust-lang#23799).

So here a PR to removed this bound for `SendError<T>`, `TrySendError<T>` and `SendTimeoutError<T>`.
…target, r=compiler-errors

Get current target config from` --print=cfg`

Compiletest was switched to querying all targets using `--print=all-target-specs-json` and `--print=target-spec-json` in rust-lang#108905. This unintentionally prevented codegen flags like `-Cpanic` from being reflected in the current target configuration. This change gets the current compiletest target config using `--print=cfg` like it was previously while still using the faster prints for getting information on all other targets.

Fixes rust-lang#110850.

`@jyn514` might be interested in reviewing since they commented on the issue.
cc `@tmandry` since this issue is affecting Fuchsia.
Document that `missing_copy_implementations` and `missing_debug_implementations` only apply to public items.

I encountered rust-lang#111359 (fixed) and noticed that the documentation didn't say that it was _intended_ that `missing_debug_implementations` only applies to public items. This PR fixes that, and makes the same wording change to `missing_copy_implementations` which has the same condition.

I chose the words to also be similar to `missing_docs` which already had such a remark.
…rrors

fixup version placeholder for `cfi_encoding` feature

Mentioned rust-lang#105452 (comment)
Add clubby789 to the bootstrap review rotation

r? `@clubby789` - thank you for volunteering!

I have been meaning for a very long time now to write up how to do reviews, but I haven't gotten around to it yet :( here is a short summary:

1. If you're not sure what the changes does or if it's ok, always feel free to ping someone else on the team, especially in the first few weeks. You can use `r? bootstrap` to get triagebot to assign someone else.
2. Bootstrap unfortunately has very few tests. Things that touch CLI or toml parsing should likely have a test in `src/bootstrap/config/tests.rs`; things that touch "core" build logic should have a test in `builder/tests.rs`, anything else kinda just slips in :( see rust-lang#102563 for ideas on how to improve the situation here.
3. "Major" changes should be documented in `src/bootstrap/CHANGELOG.md`. "Major" is up to you, but if it breaks a config option or otherwise is likely to break *someone's* build, it's probably major. If it breaks nearly *everyone*'s build, it should also update `VERSION` in `lib.rs`; this should be very rare. Please also ping me or Mark-Simulacrum for major changes (I might set up a triagebot ping for this so you don't have to remember).
4. Once you've approved the PR, tell bors it's ok - you've been contributing for a while so you know how bors works, but here's a cheatsheet just in case: https://bors.rust-lang.org

Documentation about how to use bootstrap lives at https://rustc-dev-guide.rust-lang.org/building/bootstrapping.html; internal docs live in `src/bootstrap/README.md`. The latter unfortunately is not very complete.
@rustbot rustbot added A-meta Area: Issues & PRs about the rust-lang/rust repository itself A-testsuite Area: The testsuite used to check the correctness of rustc labels May 15, 2023
@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. rollup A PR which is a rollup labels May 15, 2023
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=7

@bors
Copy link
Contributor

bors commented May 15, 2023

📌 Commit 63315ca 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 May 15, 2023
@bors
Copy link
Contributor

bors commented May 15, 2023

⌛ Testing commit 63315ca with merge ea2ede58fe932d1fe56e09f0ffb03ab7aee3779b...

@bors
Copy link
Contributor

bors commented May 15, 2023

💔 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 May 15, 2023
@rust-log-analyzer
Copy link
Collaborator

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

Click to see the possible cause of the failure (guessed by this bot)
configure: 
configure: writing `config.toml` in current directory
configure: 
configure: run `python /checkout/obj/build/tmp/distcheck/x.py --help`
error: vendoring required, but vendor directory does not exist.
       Run `cargo vendor --sync ./src/tools/cargo/Cargo.toml --sync ./src/tools/rust-analyzer/Cargo.toml --sync ./compiler/rustc_codegen_cranelift/Cargo.toml --sync ./src/bootstrap/Cargo.toml ` to initialize the vendor directory.
Alternatively, use the pre-vendored `rustc-src` dist component.
  File "/checkout/obj/build/tmp/distcheck/src/bootstrap/bootstrap.py", line 1100, in <module>
    main()
  File "/checkout/obj/build/tmp/distcheck/src/bootstrap/bootstrap.py", line 1084, in main
    bootstrap(args)
    bootstrap(args)
  File "/checkout/obj/build/tmp/distcheck/src/bootstrap/bootstrap.py", line 1031, in bootstrap
    build.check_vendored_status()
  File "/checkout/obj/build/tmp/distcheck/src/bootstrap/bootstrap.py", line 965, in check_vendored_status
    raise Exception("{} not found".format(vendor_dir))
Exception: /checkout/obj/build/tmp/distcheck/vendor not found
make: *** [Makefile:42: check] Error 1

@bors
Copy link
Contributor

bors commented May 25, 2023

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

@apiraino apiraino removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 25, 2023
@matthiaskrgr matthiaskrgr deleted the rollup-azbq98b branch March 16, 2024 18:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-meta Area: Issues & PRs about the rust-lang/rust repository itself A-testsuite Area: The testsuite used to check the correctness of rustc rollup A PR which is a rollup 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.