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

Refactoring report_method_error #105752

Merged
merged 2 commits into from
Jan 3, 2023

Conversation

chenyukang
Copy link
Member

@chenyukang chenyukang commented Dec 15, 2022

While working on #105732, I found it's hard to follow this long function,
so I tried to make it shorter.

It's not easy for code reviewing, since so many lines of code changes,
but only the positions are changed.

Generally, I extract two sub-methods from report_method_error:

let report_candidates = |span: Span,

to note_candidates_on_method_error

And this long block:

MethodError::NoMatch(NoMatchData {

to report_no_match_method_error.

r? @compiler-errors

@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. labels Dec 15, 2022
@chenyukang chenyukang force-pushed the yukang/refactor-method-error branch 2 times, most recently from 0da20a8 to bda60d6 Compare December 15, 2022 16:13
@bors
Copy link
Contributor

bors commented Dec 15, 2022

☔ The latest upstream changes (presumably #105746) made this pull request unmergeable. Please resolve the merge conflicts.

@compiler-errors
Copy link
Member

This could use a rebase. I'll approve after that.

@compiler-errors compiler-errors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Dec 27, 2022
@chenyukang chenyukang force-pushed the yukang/refactor-method-error branch from bda60d6 to e686eb3 Compare December 27, 2022 11:21
@chenyukang
Copy link
Member Author

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Dec 27, 2022
@bors
Copy link
Contributor

bors commented Jan 2, 2023

☔ The latest upstream changes (presumably #84762) made this pull request unmergeable. Please resolve the merge conflicts.

@chenyukang chenyukang force-pushed the yukang/refactor-method-error branch from e686eb3 to 93e62a4 Compare January 3, 2023 04:39
@chenyukang
Copy link
Member Author

emmm, conflict again...
@rustbot ready

@compiler-errors
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Jan 3, 2023

📌 Commit 93e62a4 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 Jan 3, 2023
@bors
Copy link
Contributor

bors commented Jan 3, 2023

⌛ Testing commit 93e62a4 with merge c757267...

@bors
Copy link
Contributor

bors commented Jan 3, 2023

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

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jan 3, 2023
@bors bors merged commit c757267 into rust-lang:master Jan 3, 2023
@rustbot rustbot added this to the 1.68.0 milestone Jan 3, 2023
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (c757267): 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)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-2.6% [-2.6%, -2.6%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -2.6% [-2.6%, -2.6%] 1

Cycles

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

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. 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.

5 participants