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

Merged
merged 27 commits into from
Nov 12, 2024
Merged

Rollup of 7 pull requests #132954

merged 27 commits into from
Nov 12, 2024

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

Henry Jiang and others added 27 commits November 5, 2024 12:58
Signed-off-by: onur-ozkan <work@onurozkan.dev>
Signed-off-by: onur-ozkan <work@onurozkan.dev>
Signed-off-by: onur-ozkan <work@onurozkan.dev>
Signed-off-by: onur-ozkan <work@onurozkan.dev>
Signed-off-by: onur-ozkan <work@onurozkan.dev>
Signed-off-by: onur-ozkan <work@onurozkan.dev>
…ged-logic, r=Mark-Simulacrum

extend the "if-unchanged" logic for compiler builds

Implements the first item from [this tracking issue](rust-lang#131744).

In short, we want to make "if-unchanged" logic to check for changes outside of certain allowed directories, and this PR implements that.

See rust-lang#131658 for more context.
…, r=compiler-errors

Proper support for cross-crate recursive const stability checks

~~Stacked on top of rust-lang#132492; only the last three commits are new.~~

In a crate without `staged_api` but with `-Zforce-unstable-if-unmarked`, we now subject all functions marked with `#[rustc_const_stable_indirect]` to recursive const stability checks. We require an opt-in so that by default, a crate can be built with `-Zforce-unstable-if-unmarked` and use nightly features as usual. This property is recorded in the crate metadata so when a `staged_api` crate calls such a function, it sees the `#[rustc_const_stable_indirect]` and allows it to be exposed on stable. This, finally, will let us expose `const fn` from hashbrown on stable.

The second commit makes const stability more like regular stability: via `check_missing_const_stability`, we ensure that all publicly reachable functions have a const stability attribute -- both in  `staged_api` crates and `-Zforce-unstable-if-unmarked` crates. To achieve this, we move around the stability computation so that const stability is computed after regular stability is done. This lets us access the final result of the regular stability computation, which we use so that `const fn` can inherit the regular stability (but only if that is "unstable"). Fortunately, this lets us get rid of an `Option` in `ConstStability`.

This is the last PR that I have planned in this series.

r? `@compiler-errors`
…ieyouxu

AIX: add run-make support

On AIX, we are required explicit link against `c++` and `c++abi` to support running the run-make test suite.
…youxu

Warn about invalid `mir-enable-passes` pass names

Fixes rust-lang#132805
…, r=wesleywiser

Triagebot: Consolidate the T-compiler ad hoc assignment groups

rust-lang/compiler-team#757

1. Inline compiler-team and compiler-team-contributors into compiler
2. Sort members alphabetically
…r=chenyukang

Make precise capturing suggestion machine-applicable only if it has no APITs

cc rust-lang#132932

The only case where this suggestion is not machine-applicable is when we suggest turning arg-position impl trait into type parameters, which may expose type parameters that were not turbofishable before.
clarify `must_produce_diag` ICE for debugging

We have a sanity check to ensure the expensive `trimmed_def_paths` functions are called only when producing diagnostics, and not e.g. on the happy path. The panic often happens IME during development because of randomly printing stuff, causing an ICE if no diagnostics were also emitted.

I have this change locally but figured it could be useful to others, so this PR clarifies the message when this happens during development.

The output currently looks like this by default; it's a bit confusing with words missing:

```
thread 'rustc' panicked at compiler/rustc_errors/src/lib.rs:628:17:
must_produce_diag: `trimmed_def_paths` called but no diagnostics emitted; `with_no_trimmed_paths` for debugging. called at: disabled backtrace
stack backtrace:
   0:     0x7ffff79570f6 - std::backtrace_rs::backtrace::libunwind::trace::h33576c57327a3cea
                               at .../library/std/src/../../backtrace/src/backtrace/libunwind.rs:116:5
   1:     0x7ffff79570f6 - std::backtrace_rs::backtrace::trace_unsynchronized::h7972a09393b420db
                               at .../library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7ffff79570f6 - std::sys::backtrace::_print_fmt::hae8c5bbfbf7a8322
                               at .../library/std/src/sys/backtrace.rs:66:9
   3:     0x7ffff79570f6 - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::h1fd6a7a210f5b535
...
```

The new output mentions how to get more information and locate where the `with_no_trimmed_paths` call needs to be added.

1. By default, backtraces are disabled:
```
thread 'rustc' panicked at compiler/rustc_errors/src/lib.rs:642:17:
`trimmed_def_paths` called, diagnostics were expected but none were emitted. Use `with_no_trimmed_paths` for debugging. Backtraces are currently disabled: set `RUST_BACKTRACE=1` and re-run to see where it happened.
stack backtrace:
   0:     0x7ffff79565f6 - std::backtrace_rs::backtrace::libunwind::trace::h33576c57327a3cea
...
```

2. With backtraces enabled:
```
thread 'rustc' panicked at compiler/rustc_errors/src/lib.rs:642:17:
`trimmed_def_paths` called, diagnostics were expected but none were emitted. Use `with_no_trimmed_paths` for debugging. This happened in the following `must_produce_diag` call's backtrace:
   0: <rustc_errors::DiagCtxtHandle>::set_must_produce_diag
             at .../compiler/rustc_errors/src/lib.rs:1133:58
   1: <rustc_session::session::Session>::record_trimmed_def_paths
             at .../compiler/rustc_session/src/session.rs:327:9
   2: rustc_middle::ty::print::pretty::trimmed_def_paths
             at .../compiler/rustc_middle/src/ty/print/pretty.rs:3351:5
...
```

A `\n` could be added here or there, but it didn't matter much whenever I hit this case with the new message.
@rustbot rustbot added A-compiletest Area: The compiletest test runner A-meta Area: Issues & PRs about the rust-lang/rust repository itself A-run-make Area: port run-make Makefiles to rmake.rs labels Nov 12, 2024
@rustbot rustbot added 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-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-infra Relevant to the infrastructure 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 Nov 12, 2024
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=7

@bors
Copy link
Contributor

bors commented Nov 12, 2024

📌 Commit f00a31c 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 Nov 12, 2024
@bors
Copy link
Contributor

bors commented Nov 12, 2024

⌛ Testing commit f00a31c with merge f7273e0...

@bors
Copy link
Contributor

bors commented Nov 12, 2024

☀️ Test successful - checks-actions
Approved by: matthiaskrgr
Pushing f7273e0 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Nov 12, 2024
@bors bors merged commit f7273e0 into rust-lang:master Nov 12, 2024
7 checks passed
@rustbot rustbot added this to the 1.84.0 milestone Nov 12, 2024
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#131831 extend the "if-unchanged" logic for compiler builds 81be30b1f9073ebc08e34db98c0e1765e27e2afa (link)
#132541 Proper support for cross-crate recursive const stability ch… 597256cd17d12b009e55299988ed39634bafc03d (link)
#132657 AIX: add run-make support 1a6d2a354e87d9be2dcc0bcb4b038baaa282b8b9 (link)
#132901 Warn about invalid mir-enable-passes pass names 7836ad463f794a1dc6d82bd3c303d2324f13695c (link)
#132923 Triagebot: Consolidate the T-compiler ad hoc assignment gro… 9f364e027e1aeca8b8c5af504b6916bfbf2f95f6 (link)
#132938 Make precise capturing suggestion machine-applicable only i… 3324c7e2078a7cc060c79aa765fa9e44e508f2d3 (link)
#132947 clarify must_produce_diag ICE for debugging 5b5ad01232d8dc996c2f169a6b4061d9165e3f11 (link)

previous master: 6503543d11

In the case of a perf regression, run the following command for each PR you suspect might be the cause: @rust-timer build $SHA

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (f7273e0): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results (primary -1.2%, secondary -0.0%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
1.1% [1.1%, 1.1%] 1
Improvements ✅
(primary)
-1.2% [-1.2%, -1.2%] 1
Improvements ✅
(secondary)
-1.2% [-1.2%, -1.2%] 1
All ❌✅ (primary) -1.2% [-1.2%, -1.2%] 1

Cycles

Results (secondary 9.7%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
9.7% [7.7%, 11.6%] 6
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 784.558s -> 785.991s (0.18%)
Artifact size: 335.34 MiB -> 335.39 MiB (0.02%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-compiletest Area: The compiletest test runner A-meta Area: Issues & PRs about the rust-lang/rust repository itself A-run-make Area: port run-make Makefiles to rmake.rs A-testsuite Area: The testsuite used to check the correctness of rustc merged-by-bors This PR was explicitly merged by bors. 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-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-infra Relevant to the infrastructure 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