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 9 pull requests #122607

Merged
merged 18 commits into from Mar 17, 2024
Merged

Rollup of 9 pull requests #122607

merged 18 commits into from Mar 17, 2024

Conversation

fmease
Copy link
Member

@fmease fmease commented Mar 16, 2024

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

gvozdvmozgu and others added 18 commits February 24, 2024 08:14
Signed-off-by: onur-ozkan <work@onurozkan.dev>
…_crate

When profiling a build of Zed, I found myself in need of names of crates that take the longest to register in downstream crates.
…kingjubilee

Add `wasm_c_abi` `future-incompat` lint

This is a warning that will tell users to update to `wasm-bindgen` v0.2.88, which supports spec-compliant C ABI.

The idea is to prepare for a future where Rust will switch to the spec-compliant C ABI by default; so not to break everyone's world, this warning is introduced.

Addresses rust-lang#71871.
…on-associated-items, r=fmease

fix attribute validation on associated items in traits

rust-lang#121537, fixed attribute validation on associated items in traits
…-errors

Split refining_impl_trait lint into _reachable, _internal variants

As discussed in rust-lang#119535 (comment):

> We discussed this today in triage and developed a consensus to:
>
> * Add a separate lint against impls that refine a return type defined with RPITIT even when the trait is not crate public.
> * Place that in a lint group along with the analogous crate public lint.
> * Create an issue to solicit feedback on these lints (or perhaps two separate ones).
> * Have the warnings displayed with each lint reference this issue in a similar manner to how we do that today with the required `Self: '0'` bound on GATs.
> * Make a note to review this feedback on 2-3 release cycles.

This points users to rust-lang#121718 to leave feedback.
…th-false, r=Mark-Simulacrum

fix `long-linker-command-lines` failure caused by `rust.rpath=false`

Fixes `long-linker-command-lines` test failure (which happens when `rust.rpath` is set to `false`) by adjusting `LD_LIBRARY_PATH`.

Fixes rust-lang#90921
…iler-errors

Delegation: fix ICE on duplicated associative items

Currently, functions delegation is only supported for delegation items with early resolved paths e.g. free functions and trait methods. During name resolution, information about function signatures is collected, including the number of parameters and whether there are self arguments. This information is then used when lowering from a delegation item into a regular function(`rustc_ast_lowering/src/delegation.rs`). The signature is usually inherited from path resolution id(`path_id`). However, in the case of trait impls `path_id` and `item_id` may be different:

```rust
trait Trait {
    fn foo(&self) -> u32 { 0 }
}

struct S;

mod to_reuse {
    use crate::S;

    pub fn foo(_: &S) -> u32 { 0 }
}

impl Trait for S {
    reuse to_reuse::foo { self }
    //~^ The signature should be inherited from item id instead of resolution id
}

```

Let's now consider an example from [issue](rust-lang#119920). Due to duplicated associative elements partial resolution for one of them will not be recorded:

https://github.com/rust-lang/rust/blob/9023f908cfbe7a475f369717a61cb8eb865cfd25/compiler/rustc_resolve/src/late.rs#L3153-L3162

Which leads to an incorrect `is_in_trait_impl`

https://github.com/rust-lang/rust/blob/9023f908cfbe7a475f369717a61cb8eb865cfd25/compiler/rustc_ast_lowering/src/item.rs#L981-L986

Which leads to an incorrect id for signature inheritance

https://github.com/rust-lang/rust/blob/9023f908cfbe7a475f369717a61cb8eb865cfd25/compiler/rustc_ast_lowering/src/delegation.rs#L99-L105

Which lead to an ICE from original issue.

This patch fixes wrong `is_in_trait_impl`  calculation.

fixes rust-lang#119920
…piler-errors

Remove obsolete parameter `speculative` from `instantiate_poly_trait_ref`

In rust-lang#122527 I totally missed that `speculative` has become obsolete with the removal of `hir_trait_to_predicates` / due to rust-lang#113671.

Fixes rust-lang#114635.

r? `@compiler-errors`
Optimize `ptr::replace`

rust-lang#83022 optimized `mem::replace` to reduce the number of `memcpy`s. `ptr::replace`, which is [documented to behave just like `mem::replace`](https://doc.rust-lang.org/nightly/std/ptr/fn.replace.html), was not optimized however, leading to [worse code](https://godbolt.org/z/T3hdEEdfe) and missed optimizations. This PR simply forwards `ptr::replace` to `mem::replace` to take advantage of the better implementation.
…test-run-make, r=Nilstrieb

Mention jieyouxu for changes to compiletest, run-make tests and the run-make-support library
…tore-crate-name-in-profile, r=Nadrieril

rustc-metadata: Store crate name in self-profile of metadata_register_crate

When profiling a build of Zed, I found myself in need of names of crates that take the longest to register in downstream crates.
@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. rollup A PR which is a rollup labels Mar 16, 2024
@fmease
Copy link
Member Author

fmease commented Mar 16, 2024

@bors r+ rollup=never p=5

@bors
Copy link
Contributor

bors commented Mar 16, 2024

📌 Commit caa6131 has been approved by fmease

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 Mar 16, 2024
@bors
Copy link
Contributor

bors commented Mar 17, 2024

⌛ Testing commit caa6131 with merge c8813dd...

@bors
Copy link
Contributor

bors commented Mar 17, 2024

☀️ Test successful - checks-actions
Approved by: fmease
Pushing c8813dd to master...

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

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#117918 Add wasm_c_abi future-incompat lint 93c473a1ec1ecc8f5dc8b1e9099425d081e4615e (link)
#121545 fix attribute validation on associated items in traits ca3b995011807606822702fba622c19184ad49b5 (link)
#121720 Split refining_impl_trait lint into _reachable, _internal v… 18f8141884bb7efdb0a8e38c9023f4225b899af5 (link)
#122270 fix long-linker-command-lines failure caused by `rust.rpa… 48471efa4a88c279965bd8892c866b77f00a2c99 (link)
#122564 Delegation: fix ICE on duplicated associative items 1c3a29f751deb9824c55e4b362c0948f9f1ed911 (link)
#122577 Remove obsolete parameter speculative from `instantiate_p… d9c600c0855dc05c4f846dac6eada24c39a683d4 (link)
#122601 Optimize ptr::replace 6a5549c1d11fbf0362a8bab07646a589e05f65bf (link)
#122604 Mention jieyouxu for changes to compiletest, run-make tests… 3738be7a2ec18cca6bc5b6f4e5cfca1b2a1a459c (link)
#122605 rustc-metadata: Store crate name in self-profile of metadat… ef7ad6f5136f327b948f222979bb47171f379c93 (link)

previous master: 4c1b9c3e2f

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

Overall result: ❌✅ regressions and improvements - ACTION NEEDED

Next Steps: If you can justify the regressions found in this perf run, please indicate this with @rustbot label: +perf-regression-triaged along with sufficient written justification. If you cannot justify the regressions please open an issue or create a new PR that fixes the regressions, add a comment linking to the newly created issue or PR, and then add the perf-regression-triaged label to this PR.

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

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
1.7% [1.7%, 1.7%] 1
Regressions ❌
(secondary)
2.7% [2.7%, 2.7%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-5.3% [-5.3%, -5.3%] 1
All ❌✅ (primary) 1.7% [1.7%, 1.7%] 1

Max RSS (memory usage)

Results

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)
6.1% [3.5%, 8.8%] 2
Regressions ❌
(secondary)
4.5% [1.0%, 6.5%] 3
Improvements ✅
(primary)
-7.8% [-7.8%, -7.8%] 1
Improvements ✅
(secondary)
-4.6% [-4.6%, -4.6%] 1
All ❌✅ (primary) 1.5% [-7.8%, 8.8%] 3

Cycles

Results

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)
1.9% [1.9%, 1.9%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-4.4% [-5.1%, -3.8%] 2
All ❌✅ (primary) 1.9% [1.9%, 1.9%] 1

Binary size

Results

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.5% [0.0%, 2.8%] 6
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.0% [-0.1%, -0.0%] 8
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.2% [-0.1%, 2.8%] 14

Bootstrap: 670.532s -> 669.642s (-0.13%)
Artifact size: 312.75 MiB -> 312.75 MiB (0.00%)

@rustbot rustbot added the perf-regression Performance regression. label Mar 17, 2024
@rust-log-analyzer
Copy link
Collaborator

A job failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
##[endgroup]
Secret source: Actions
Prepare workflow directory
Prepare all required actions
Complete job name: skip if S-waiting-on-bors
##[group]Run # Fetch state and labels of PR
# Fetch state and labels of PR
# Or exit successfully if PR does not exist
JSON=$(gh pr view cargo_update --repo $GITHUB_REPOSITORY --json labels,state || exit 0)
STATE=$(echo "$JSON" | jq -r '.state')
WAITING_ON_BORS=$(echo "$JSON" | jq '.labels[] | any(.name == "S-waiting-on-bors"; .)')

# Exit with error if open and S-waiting-on-bors
if [[ "$STATE" == "OPEN" && "$WAITING_ON_BORS" == "true" ]]; then
fi
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}

@fmease fmease deleted the rollup-ozl1eeq branch March 17, 2024 11:14
@workingjubilee
Copy link
Contributor

Huh. Didn't expect anything to actually be different here. Most likely candidate was

@rust-timer build 6a5549c

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (6a5549c): comparison URL.

Overall result: ❌ regressions - ACTION NEEDED

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

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

Max RSS (memory usage)

Results

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)
6.0% [2.6%, 9.3%] 2
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-5.0% [-8.0%, -2.0%] 2
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.5% [-8.0%, 9.3%] 4

Cycles

Results

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)
1.8% [1.8%, 1.8%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-7.8% [-8.8%, -6.8%] 6
All ❌✅ (primary) 1.8% [1.8%, 1.8%] 1

Binary size

Results

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.5% [0.0%, 3.1%] 6
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.0% [-0.1%, -0.0%] 8
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.2% [-0.1%, 3.1%] 14

Bootstrap: 670.532s -> 667.427s (-0.46%)
Artifact size: 312.75 MiB -> 312.72 MiB (-0.01%)

@Kobzol
Copy link
Contributor

Kobzol commented Mar 19, 2024

#122601 should in theory enable more LLVM optimizations, so regressing a single opt-full benchmark is fine to me.

@rustbot label: +perf-regression-triaged

@rustbot rustbot added the perf-regression-triaged The performance regression has been triaged. label Mar 19, 2024
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. 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-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.

None yet