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 10 pull requests #106757

Merged
merged 23 commits into from
Jan 12, 2023
Merged

Rollup of 10 pull requests #106757

merged 23 commits into from
Jan 12, 2023

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

RalfJung and others added 23 commits January 9, 2023 16:40
LLVM upstream has deprecated llvm::makeArrayRef and will remove it.
…i-obk

Fix invalid syntax and incomplete suggestion in impl Trait parameter type suggestions for E0311

Fixes rust-lang#105544

The problems: The suggestion given for E0311 has invalid syntax when the synthetic type parameter is used for Trait type in function declaration:
```rust
fn foo(d: impl Sized) -> impl Sized
```
instead of explicitly specified like the following:
```rust
fn foo<T: Sized>(d: T) -> impl Sized
```
In addition to the syntax error, the suggestions given for E0311 are not complete when multiple elided lifetimes are involved in lifetime bounds, not all involved parameters are given the named lifetime in the suggestions. For the following test case:
```
fn foo(d: impl Sized, p: &mut ()) -> impl Sized + '_ {
    (d, p)
}
```
a good suggestion should add the lifetime 'a to both d and p, instead of d only:
```
fn foo<'a>(d: impl Sized + 'a, p: &'a mut ()) -> impl Sized + '_ {
    (d, p)
}
```

The Solution: Fix the syntax problem in the suggestions when synthetic type parameter is used, and also add lifetimes for all involved parameters.
…didates, r=oli-obk

Prefer non-`[type error]` candidates during selection

Fixes rust-lang#102130
Fixes rust-lang#106351

r? types

note: Alternatively we could filter out error where-clauses during param-env construction? But we still need to filter out impls with errors during `match_impl`, I think.
…=jackh726

Allow codegen to unsize `dyn*` to `dyn`

`dyn* Trait` is just another type that implements `Trait`, so we should be able to unsize `&dyn* Trait` into `&dyn Trait` perfectly fine, same for `Box` and other unsizeable types.

Fixes rust-lang#106488
std tests: use __OsLocalKeyInner from realstd

This is basically the same as rust-lang#100201, but for __OsLocalKeyInner:

Some std tests are failing in Miri on Windows because [this static](https://github.com/rust-lang/rust/blob/a377893da2cd7124e5a18c7116cbb70e16dd5541/library/std/src/sys/windows/thread_local_key.rs#L234-L239) is getting duplicated, and Miri does not handle that properly -- Miri does not support this magic `.CRT$XLB` linker section, but instead just looks up this particular hard-coded static in the standard library. This PR lets the test suite use the std static instead of having its own copy.

Fixes rust-lang/miri#2754
r? `@thomcc`
Test that we cannot use trait impl methods arguments as defining uses

Addresses rust-lang#63063 (comment)

r? `@dtolnay`
…errors

Conserve cause of `ImplDerivedObligation` in E0599

CC rust-lang#86377.
…ikic

rustc_llvm: replace llvm::makeArrayRef with ArrayRef constructors.

LLVM upstream has deprecated llvm::makeArrayRef and will remove it.
…er-x, r=jyn514

Revert "warn newer available version of the x tool"

Reverts rust-lang#104552

Running the x executable directly created an [issue](rust-lang#106469) here. There are other options for warning a user that a newer version of x exists in the issue's discussion as well.

r? `@jyn514`
…ify, r=compiler-errors

Clean up `OnUnimplementedFormatString::verify`

Lift the always-allowed symbols to a static array and replace a `match iter().find(...)` with `iter().any(...)`
@rustbot rustbot added T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) 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-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 Jan 12, 2023
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=10

@bors
Copy link
Contributor

bors commented Jan 12, 2023

📌 Commit e8ef83e 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 12, 2023
@bors
Copy link
Contributor

bors commented Jan 12, 2023

⌛ Testing commit e8ef83e with merge 2b8590e...

@bors
Copy link
Contributor

bors commented Jan 12, 2023

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

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jan 12, 2023
@bors bors merged commit 2b8590e into rust-lang:master Jan 12, 2023
@rustbot rustbot added this to the 1.68.0 milestone Jan 12, 2023
@bors bors mentioned this pull request Jan 12, 2023
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (2b8590e): 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)
0.6% [0.6%, 0.7%] 6
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.5% [-0.5%, -0.5%] 1
All ❌✅ (primary) 0.6% [0.6%, 0.7%] 6

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)
- - 0
Regressions ❌
(secondary)
0.9% [0.9%, 0.9%] 1
Improvements ✅
(primary)
-2.4% [-2.4%, -2.3%] 2
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -2.4% [-2.4%, -2.3%] 2

Cycles

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

@rustbot rustbot added the perf-regression Performance regression. label Jan 12, 2023
@pnkfelix
Copy link
Member

@rust-timer build 07baff06cfbc3515633b29be88f80fb6d846c6d8

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (07baff06cfbc3515633b29be88f80fb6d846c6d8): comparison URL.

Overall result: ❌ regressions - ACTION NEEDED

Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf.

Next Steps: If you can justify the regressions found in this try perf run, please indicate this with @rustbot label: +perf-regression-triaged along with sufficient written justification. If you cannot justify the regressions please fix the regressions and do another perf run. If the next run shows neutral or positive results, the label will be automatically removed.

@bors rollup=never
@rustbot label: -S-waiting-on-perf +perf-regression

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)
0.7% [0.6%, 0.8%] 6
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.7% [0.6%, 0.8%] 6

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)
- - 0
Regressions ❌
(secondary)
0.9% [0.9%, 0.9%] 1
Improvements ✅
(primary)
-3.0% [-3.3%, -2.8%] 2
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -3.0% [-3.3%, -2.8%] 2

Cycles

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

@rylev
Copy link
Member

rylev commented Jan 19, 2023

Looks like #106309 is responsible for the perf issue.

cc @compiler-errors @oli-obk

JohnTitor added a commit to JohnTitor/rust that referenced this pull request Jan 23, 2023
…etrochenkov

Filter param-env predicates for errors before calling `to_opt_poly_trait_pred`

cc rust-lang#106309 rust-lang#106757 (comment)

r? `@ghost`
@matthiaskrgr matthiaskrgr deleted the rollup-9j8830g 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-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. 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-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.