Skip to content

Suggest defining const parameter when appropriate #110041

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 1 commit into from
Apr 9, 2023

Conversation

fmease
Copy link
Member

@fmease fmease commented Apr 7, 2023

Helps a bit with #91119.
Following #105523's lead, I use placeholder /* Type */ instead of _ in the suggestion.
It should be easier for newcomers to parse.

@rustbot label A-diagnostics
r? diagnostics

@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. A-diagnostics Area: Messages for errors, warnings, and lints labels Apr 7, 2023
@fmease
Copy link
Member Author

fmease commented Apr 7, 2023

Currently format!ting a format!ted string :]. If you would like me to, I can instead build up the suggestion with += and do some other refactorings like early returns and so on :)

@compiler-errors
Copy link
Member

@bors r+

@bors
Copy link
Collaborator

bors commented Apr 9, 2023

📌 Commit f2acafe has been approved by compiler-errors

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 Apr 9, 2023
@bors
Copy link
Collaborator

bors commented Apr 9, 2023

⌛ Testing commit f2acafe with merge 56e0626...

@bors
Copy link
Collaborator

bors commented Apr 9, 2023

☀️ Test successful - checks-actions
Approved by: compiler-errors
Pushing 56e0626 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Apr 9, 2023
@bors bors merged commit 56e0626 into rust-lang:master Apr 9, 2023
@rustbot rustbot added this to the 1.70.0 milestone Apr 9, 2023
@fmease fmease deleted the diag-sugg-adding-const-param branch April 9, 2023 14:21
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (56e0626): comparison URL.

Overall result: ✅ improvements - no action needed

@rustbot label: -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
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-1.6% [-1.6%, -1.6%] 1
All ❌✅ (primary) - - 0

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

Cycles

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

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
A-diagnostics Area: Messages for errors, warnings, and lints merged-by-bors This PR was explicitly merged by bors. 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants