Skip to content

Rollup of 6 pull requests #119927

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 12 commits into from
Jan 13, 2024
Merged

Rollup of 6 pull requests #119927

merged 12 commits into from
Jan 13, 2024

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

lcnr and others added 12 commits January 12, 2024 16:21
…rochenkov

Varargs support for system ABI

This PR allows functions with the `system` ABI to be variadic (under the `extended_varargs_abi_support` feature tracked in rust-lang#100189). On x86 windows, the `system` ABI is equivalent to `C` for variadic functions. On other platforms, `system` is already equivalent to `C`.

Fixes rust-lang#110505
rename `reported_signature_mismatch` to reflect its use

it's used for a lot of things, not only closures
…, r=compiler-errors

Allow `~const` on associated type bounds again

This follows from [this Zulip discussion](https://rust-lang.zulipchat.com/#narrow/stream/419616-t-compiler.2Fproject-const-traits/topic/projections.20on.20.28~.29const.20Trait.20.26.20.28~.29const.20assoc.20ty.20bounds).

Basically in my opinion, it makes sense to allow `~const` on associated type bounds again since they're quite useful even though we haven't implemented the proposed syntax `<Ty as ~const Trait>::Proj`/`<Ty as const Trait>::Proj` yet; that can happen as a follow-up.

This already allows more code to compile since `T::Assoc` where `T` is a type parameter and where the predicate `<T as ~const Trait>` is in the environment gets elaborated to (pseudo) `<T as ~const Trait>::Assoc`.

```rs
#[const_trait]
trait Trait {
    type Assoc: ~const Trait;
    fn func() -> i32;
}

const fn function<T: ~const Trait>() -> i32 {
    T::Assoc::func()
}
```

`~const` associated type bounds also work together with `const` bounds:

```rs
struct Type<const N: i32>;

fn procedure<T: const Trait>() -> Type<{ T::Assoc::func() }> { // `Trait` comes from above
    Type
}
```

NB: This PR also starts allowing `~const` bounds in the generics and the where-clause of trait associated types since it's trivial to support them. However, I don't know if those bounds are actually useful. Maybe we should continue to reject them?
For reference, it wouldn't make any sense to allow `~const Trait` in GACs (generic associated constants, `generic_const_items`) because they'd be absolutely useless (contrary to `const Trait`).

~~[``@]rustbot`` ping project-const-traits~~
r? project-const-traits
…rrors

Taint `_` placeholder types in trait impl method signatures

We report an error right below for them, but that kind of broken type can cause subsequent ICEs.

fixes rust-lang#119867
…=oli-obk

Remove unused `ErrorReporting` variant from overflow handling

r? oli-obk
@rustbot rustbot added 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. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. rollup A PR which is a rollup labels Jan 13, 2024
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=6

@bors
Copy link
Collaborator

bors commented Jan 13, 2024

📌 Commit f53caa1 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 Jan 13, 2024
@bors
Copy link
Collaborator

bors commented Jan 13, 2024

⌛ Testing commit f53caa1 with merge c6c4abf...

@bors
Copy link
Collaborator

bors commented Jan 13, 2024

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

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jan 13, 2024
@bors bors merged commit c6c4abf into rust-lang:master Jan 13, 2024
@rustbot rustbot added this to the 1.77.0 milestone Jan 13, 2024
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#119587 Varargs support for system ABI 7aabe509f2e1eff3c06ea083d606e0314d8a0f29 (link)
#119891 rename reported_signature_mismatch to reflect its use e079d86e89e115d0d156c03191ecfbff72cf5ef0 (link)
#119894 Allow ~const on associated type bounds again 93b391e62bc87fd9b95282c79f3289afd7c9fe52 (link)
#119896 Taint _ placeholder types in trait impl method signatures a5f91df62e7a4dbab59a8b29be6b8bf4c5abfcf1 (link)
#119898 Remove unused ErrorReporting variant from overflow handli… 9c5efd1f3a2b9c95589ffd90e2c8f3d3df75020c (link)
#119902 fix typo in fn() docs 3943a375a414825f42ad426296d137226bae292c (link)

previous master: 1d8d7b16cb

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 (c6c4abf): 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

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.3% [2.3%, 2.3%] 1
Regressions ❌
(secondary)
3.2% [0.7%, 5.6%] 4
Improvements ✅
(primary)
-2.3% [-2.5%, -2.1%] 2
Improvements ✅
(secondary)
-4.7% [-4.7%, -4.7%] 1
All ❌✅ (primary) -0.8% [-2.5%, 2.3%] 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.6% [1.6%, 1.6%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 1.6% [1.6%, 1.6%] 1

Binary size

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

Bootstrap: 669.329s -> 667.459s (-0.28%)
Artifact size: 308.19 MiB -> 308.16 MiB (-0.01%)

@matthiaskrgr matthiaskrgr deleted the rollup-885ws57 branch March 16, 2024 18:18
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
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-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. 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