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 12 pull requests #132317

Merged
merged 29 commits into from
Oct 29, 2024
Merged

Rollup of 12 pull requests #132317

merged 29 commits into from
Oct 29, 2024

Conversation

workingjubilee
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

zachs18 and others added 29 commits October 23, 2024 14:22
Clarified what method does when `truncate` parameter is set to `true`.
Co-authored-by: nora <48135649+Noratrieb@users.noreply.github.com>
It was useful at one time, but now it just causes notification noise.
+ some minor style changes
After moving some `Box` internals to a different module,
the path in the diagnostic changed.
It's conditioned on `only-x86_64` because it doesn't reliably fail on
other platforms, it's optimization dependent and failed to ICE post-PGO
in
<rust-lang#132300 (comment)>.
Remove this test for now without prejudice against relanding the test in
a more reliable form.
Mark `str::is_char_boundary` and `str::split_at*` unstably `const`.

Tracking issues: rust-lang#131516, rust-lang#131518

First commit implements `const_is_char_boundary`, second commit implements `const_str_split_at` (which depends on `const_is_char_boundary`)

~~I used `const_eval_select` for `is_char_boundary` since there is a comment about optimizations that would theoretically not happen with the simple `const`-compatible version (since `slice::get` is not `const`ifiable) cc rust-lang#84751. I have not checked if this code difference is still required for the optimization, so it might not be worth the code complication, but 🤷.~~

This changes `str::split_at_checked` to use a new private helper function `split_at_unchecked` (copied from `split_at_mut_unchecked`) that does pointer stuff instead of `get_unchecked`, since that is not currently `const`ifiable due to using the `SliceIndex` trait.
…, r=lcnr

Hack out effects support for old solver

Opening this for vibes ✨

Turns out that a basic, somewhat incomplete implementation of host effects is achievable in the old trait solver pretty easily. This should be sufficient for us to use in the standard library itself.

Regarding incompleteness, maybe we should always treat host predicates as ambiguous in intercrate mode (at least in the old solver) to avoid any worries about accidental impl overlap or something.

r? ```@lcnr``` cc ```@fee1-dead```
…=spastorino

Collect item bounds for RPITITs from trait where clauses just like associated types

We collect item bounds from trait where clauses for *associated types*, i.e. this:

```rust
trait Foo
where
    Self::Assoc: Send
{
    type Assoc;
}
```

Becomes this:

```rust
trait Foo {
    type Assoc: Send;
}
```

Today, with RPITITs/AFIT and return-type notation, we don't do that, i.e.:

```rust
trait Foo where Self::method(..): Send {
    fn method() -> impl Sized;
}

fn is_send(_: impl Send) {}
fn test<T: Foo>() {
    is_send(T::method());
}
```

...which fails on nightly today.

 Turns out it's super easy to fix this, and we just need to use the `associated_type_bounds` lowering function in `explicit_item_bounds_with_filter`, which has that logic baked in.
correct LLVMRustCreateThinLTOData arg types

`LLVMRustCreateThinLTOData` defined in rust as
```rust
    pub fn LLVMRustCreateThinLTOData(
        Modules: *const ThinLTOModule,
        NumModules: c_uint,
        PreservedSymbols: *const *const c_char,
        PreservedSymbolsLen: c_uint,
    ) -> Option<&'static mut ThinLTOData>;
```
but in cpp as
```cpp
extern "C" LLVMRustThinLTOData *
LLVMRustCreateThinLTOData(LLVMRustThinLTOModule *modules, int num_modules,
                          const char **preserved_symbols, int num_symbols) {
```

(note `c_unit` vs `int` types). Let it be actually `size_t`.

Also fixes return type of `LLVMRustDIBuilderCreateOpLLVMFragment` to uint64_t as other similar functions around, which should be correct, i assume.
…orkingjubilee

Split `boxed.rs` into a few modules

I wanted to add an impl for `Box<_>`, but was quickly discouraged by the 3K file. This splits off a couple bits, making it at least a bit more manageable.

r? ````@workingjubilee```` (I think you are not bothered by refactorings like this?)
…a-kruppe,beetrees,workingjubilee

riscv-soft-abi-with-float-features.rs: adapt for LLVM 20

Adapts a test for LLVM 20. No functional changes intended.
…oratrieb

clarified doc for `std::fs::OpenOptions.truncate()`

Clarified what method does when `std::fs::OpenOptions.truncate()` parameter is set to `true`.
Remove my ping for rustdoc/clean/types.rs

It was useful at one time, but now it just causes notification noise.
…t, r=lqd

Remove myself from mentions inside `tests/ui/check-cfg` directory

This PR removes myself from mentions inside `tests/ui/check-cfg` directory.

I'm not sure this particular mention has ever been useful to me, and lately it's been too annoying for me to ignore it.

So remove my-self from it.
…atthiaskrgr

Delete `tests/crashes/23707.rs` because it's flaky

It's conditioned on `only-x86_64` because it doesn't reliably fail on other platforms, it's optimization dependent and failed to ICE post-PGO in
<rust-lang#132300 (comment)>. Remove this test for now without prejudice against relanding the test in a more reliable form.

I removed the `S-bug-has-test` label from rust-lang#23707.

r? compiler
compiletest: Rename `command-list.rs` to `directive-list.rs`

Because I forget the name of this file literally every single time I need to find and edit it.

r? jieyouxu
@rustbot rustbot added the A-compiletest Area: The compiletest test runner label Oct 29, 2024
@rustbot rustbot added 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-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. rollup A PR which is a rollup labels Oct 29, 2024
@workingjubilee
Copy link
Member Author

@bors r+ rollup=never p=12

@bors
Copy link
Contributor

bors commented Oct 29, 2024

📌 Commit 6c5641c has been approved by workingjubilee

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 Oct 29, 2024
@bors
Copy link
Contributor

bors commented Oct 29, 2024

⌛ Testing commit 6c5641c with merge 2dece5b...

@bors
Copy link
Contributor

bors commented Oct 29, 2024

☀️ Test successful - checks-actions
Approved by: workingjubilee
Pushing 2dece5b to master...

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

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#131375 compiler: apply clippy::clone_on_ref_ptr for CI 02cbf7335e1d47ce7a0825c381d7347af7431469 (link)
#131520 Mark str::is_char_boundary and str::split_at* unstably … 5b1c381310ff882829f943f1d329b59c29d79b27 (link)
#132119 Hack out effects support for old solver aa327668c33795c88e51a0edb0022de6482da318 (link)
#132194 Collect item bounds for RPITITs from trait where clauses ju… 96aebe2a3657244642de30830ae408a4a32f4c20 (link)
#132216 correct LLVMRustCreateThinLTOData arg types 0f16354e7175faa693f15e5fa93503c18837b039 (link)
#132233 Split boxed.rs into a few modules 0d9c43728b3ae311e9973ab9689aaa54e59b130c (link)
#132266 riscv-soft-abi-with-float-features.rs: adapt for LLVM 20 9898f0fae9c0e34019a4fa570c61c7be06c9acd2 (link)
#132270 clarified doc for std::fs::OpenOptions.truncate() a4d502954579cd6c58a766c5dd3fe3cbf415e1b9 (link)
#132284 Remove my ping for rustdoc/clean/types.rs 9221a79e94fb1145dfe2490861026eee3a6e88f4 (link)
#132293 Remove myself from mentions inside tests/ui/check-cfg dir… 6fdad963c2f66167340a30be45af734dac8e8d62 (link)
#132312 Delete tests/crashes/23707.rs because it's flaky 8e81b5fa4a04a77f67d44704d7710fbb1be1f439 (link)
#132313 compiletest: Rename command-list.rs to directive-list.rs d029fc5c291f82ef9872d19f6851f0da12955970 (link)

previous master: c8a8c82035

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 (2dece5b): comparison URL.

Overall result: ❌✅ regressions and improvements - please read the text below

Our benchmarks found a performance regression caused by this PR.
This might be an actual regression, but it can also be just noise.

Next Steps:

  • If the regression was expected or you think it can be justified,
    please write a comment with sufficient written justification, and add
    @rustbot label: +perf-regression-triaged to it, to mark the regression as triaged.
  • If you think that you know of a way to resolve the regression, try to create
    a new PR with a fix for the regression.
  • If you do not understand the regression or you think that it is just noise,
    you can ask the @rust-lang/wg-compiler-performance working group for help (members of this group
    were already notified of this PR).

@rustbot label: +perf-regression
cc @rust-lang/wg-compiler-performance

Instruction count

This is the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.

mean range count
Regressions ❌
(primary)
0.2% [0.2%, 0.4%] 4
Regressions ❌
(secondary)
0.2% [0.2%, 0.2%] 1
Improvements ✅
(primary)
-0.2% [-0.4%, -0.1%] 6
Improvements ✅
(secondary)
-0.3% [-0.3%, -0.3%] 1
All ❌✅ (primary) -0.0% [-0.4%, 0.4%] 10

Max RSS (memory usage)

Results (primary 1.7%, secondary 2.1%)

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)
2.6% [1.0%, 4.0%] 5
Regressions ❌
(secondary)
2.1% [2.1%, 2.1%] 1
Improvements ✅
(primary)
-2.4% [-2.4%, -2.4%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 1.7% [-2.4%, 4.0%] 6

Cycles

Results (primary -2.5%, secondary 2.1%)

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)
2.1% [2.0%, 2.2%] 2
Improvements ✅
(primary)
-2.5% [-2.6%, -2.3%] 2
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -2.5% [-2.6%, -2.3%] 2

Binary size

Results (primary 0.0%, secondary -0.1%)

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.1% [0.0%, 0.2%] 10
Regressions ❌
(secondary)
0.2% [0.2%, 0.2%] 3
Improvements ✅
(primary)
-0.0% [-0.1%, -0.0%] 12
Improvements ✅
(secondary)
-0.4% [-0.5%, -0.4%] 3
All ❌✅ (primary) 0.0% [-0.1%, 0.2%] 22

Bootstrap: 783.219s -> 784.701s (0.19%)
Artifact size: 333.74 MiB -> 333.58 MiB (-0.05%)

@rustbot rustbot added the perf-regression Performance regression. label Oct 29, 2024
djkoloski pushed a commit to djkoloski/rust that referenced this pull request Oct 29, 2024
…kingjubilee

Rollup of 12 pull requests

Successful merges:

 - rust-lang#131375 (compiler: apply clippy::clone_on_ref_ptr for CI)
 - rust-lang#131520 (Mark `str::is_char_boundary` and `str::split_at*` unstably `const`.)
 - rust-lang#132119 (Hack out effects support for old solver)
 - rust-lang#132194 (Collect item bounds for RPITITs from trait where clauses just like associated types)
 - rust-lang#132216 (correct LLVMRustCreateThinLTOData arg types)
 - rust-lang#132233 (Split `boxed.rs` into a few modules)
 - rust-lang#132266 (riscv-soft-abi-with-float-features.rs: adapt for LLVM 20)
 - rust-lang#132270 (clarified doc for `std::fs::OpenOptions.truncate()`)
 - rust-lang#132284 (Remove my ping for rustdoc/clean/types.rs)
 - rust-lang#132293 (Remove myself from mentions inside `tests/ui/check-cfg` directory)
 - rust-lang#132312 (Delete `tests/crashes/23707.rs` because it's flaky)
 - rust-lang#132313 (compiletest: Rename `command-list.rs` to `directive-list.rs`)

r? `@ghost`
`@rustbot` modify labels: rollup
@Kobzol
Copy link
Contributor

Kobzol commented Oct 29, 2024

Looks like a bit more time spent in LLVM? Might have been caused by a few PRs in this rollup, but the total result is a wash, so I don't think it's needed to dig deeper into this.

@rustbot label: +perf-regression-triaged

@rustbot rustbot added the perf-regression-triaged The performance regression has been triaged. label Oct 29, 2024
@workingjubilee workingjubilee deleted the rollup-x21ncea branch October 29, 2024 20:01
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-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) A-rustdoc-json Area: Rustdoc JSON backend A-testsuite Area: The testsuite used to check the correctness of rustc merged-by-bors This PR was explicitly merged by bors. perf-regression Performance regression. perf-regression-triaged The performance regression has been triaged. 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-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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.