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 6 pull requests #114264

Merged
merged 13 commits into from
Jul 30, 2023
Merged

Rollup of 6 pull requests #114264

merged 13 commits into from
Jul 30, 2023

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

vidhanio and others added 13 commits May 5, 2023 09:32
The invalid suggestion came from a wrongly created span in `rustc_parse'
for closure arguments that didn't have a type specified. Specifically,
the span in this case was the last token span, but in the case of
tuples, the span represented the last parenthesis instead of the whole
tuple, which is fixed by taking the more accurate span of the pattern.
merge functionality of `io::Sink` into `io::Empty`

Many times, there is a need for a simple dummy `io::Read`er + `io::Write`r, but currently the only options are `io::Empty` and `io::Sink` respectively. Having both of their functionality together requires writing your own boilerplate for something that makes sense to have in the standard library. This PR adds the functionality of `io::Sink` to `io::Empty`, making `io::Empty` be able to perform the tasks of both of the previous structs. (This idea was first mentioned in rust-lang#24235)

Note: I also updated some doc comments in `io::utils` in this pull request to fix inconsistencies between `io::Sink` and `io::Empty`.

API Change Proposal: rust-lang/libs-team#49
`const`-stablilize `NonNull::as_ref`

A bunch of pointer to reference methods have been made unstably const some time ago in rust-lang#91823 under the feature gate `const_ptr_as_ref`.
Out of these, `NonNull::as_ref` can be implemented as a `const fn` in stable rust today, so i hereby propose to const stabilize this function only.

Tracking issue: rust-lang#91822

``@rustbot`` label +T-libs-api -T-libs
…affleLapkin

inline format!() args from rustc_middle up to and including rustc_codegen_llvm (3)

r? `@WaffleLapkin`
…, r=petrochenkov

Weaken unnameable_types lint

`unnameable_types` lint is no longer emitted for
- associated types
- internal types

r? ``@petrochenkov``
…pkin

Fix invalid suggestion for mismatched types in closure arguments

This PR fixes the invalid suggestion for mismatched types in closure arguments.

The invalid suggestion came from a wrongly created span in the parser for closure arguments that don't have a type specified. Specifically, the span in this case was the last token span, but in the case of tuples, the span represented the last parenthesis instead of the whole tuple, which is fixed by taking the more accurate span of the pattern.

There is one unfortunate downside of this fix, it worsens even more the diagnostic for mismatched types in closure args without an explicit type. This happens because there is no correct span for implied inferred type. I tried also fixing this but it's a rabbit hole.

Fixes rust-lang#114180
…sion, r=petrochenkov

Simplify `Span::can_be_used_for_suggestions` a little tiny bit

Just something I saw randomly.
@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. rollup A PR which is a rollup labels Jul 30, 2023
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=6

@bors
Copy link
Contributor

bors commented Jul 30, 2023

📌 Commit 4916ab5 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 Jul 30, 2023
@bors
Copy link
Contributor

bors commented Jul 30, 2023

⌛ Testing commit 4916ab5 with merge a17c796...

@klensy
Copy link
Contributor

klensy commented Jul 30, 2023

#98154 probably should fix since attribute for feature?

@bors
Copy link
Contributor

bors commented Jul 30, 2023

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

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jul 30, 2023
@bors bors merged commit a17c796 into rust-lang:master Jul 30, 2023
11 checks passed
@rustbot rustbot added this to the 1.73.0 milestone Jul 30, 2023
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#98154 merge functionality of io::Sink into io::Empty bcce3fa87e585379f1e64570bc59ea514ef5a1d2 (link)
#102198 const-stablilize NonNull::as_ref ae1c924f351184ed5ec49e93074617e6354e8de1 (link)
#114074 inline format!() args from rustc_middle up to and including… e1e8d114e7b1a454b698c497c3ff2ede413da620 (link)
#114246 Weaken unnameable_types lint 1d1377adbdcf9f657ae4fe86cc092076dcf15884 (link)
#114256 Fix invalid suggestion for mismatched types in closure argu… 6dcef2490ae36e5952f142ca445a7bde860250f3 (link)
#114258 Simplify Span::can_be_used_for_suggestions a little tiny … 665343c55c355f57e40dadbee91e3d00844c6acc (link)

previous master: a8be6e070f

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 (a17c796): 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.4% [0.4%, 0.4%] 1
Regressions ❌
(secondary)
1.0% [1.0%, 1.0%] 2
Improvements ✅
(primary)
-0.4% [-0.5%, -0.3%] 3
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -0.2% [-0.5%, 0.4%] 4

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)
23.9% [23.9%, 23.9%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-4.2% [-6.1%, -2.9%] 5
Improvements ✅
(secondary)
-3.3% [-3.3%, -3.3%] 1
All ❌✅ (primary) 0.5% [-6.1%, 23.9%] 6

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.1% [1.1%, 1.1%] 1
Regressions ❌
(secondary)
3.8% [3.8%, 3.8%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 1.1% [1.1%, 1.1%] 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.1% [0.0%, 0.4%] 50
Regressions ❌
(secondary)
1.5% [1.4%, 1.6%] 4
Improvements ✅
(primary)
-0.1% [-0.4%, -0.0%] 7
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.1% [-0.4%, 0.4%] 57

Bootstrap: 651.129s -> 653.169s (0.31%)

@rustbot rustbot added the perf-regression Performance regression. label Jul 30, 2023
@rylev
Copy link
Member

rylev commented Aug 5, 2023

Changes are a wash so not worth investigating.

@rustbot label: +perf-regression-triaged

@rustbot rustbot added the perf-regression-triaged The performance regression has been triaged. label Aug 5, 2023
@matthiaskrgr matthiaskrgr deleted the rollup-dfsuu1v branch March 16, 2024 18:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

10 participants