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

Follow-up fixes to report_return_mismatched_types #123812

Merged
merged 6 commits into from
May 21, 2024

Conversation

compiler-errors
Copy link
Member

Some renames, simplifications, fixes, etc. Follow-ups to #123804. I don't think it totally disentangles this code, but it does remove some of the worst offenders on the "I am so confused" scale (e.g. get_node_fn_decl).

@rustbot
Copy link
Collaborator

rustbot commented Apr 11, 2024

r? @wesleywiser

rustbot has assigned @wesleywiser.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@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 Apr 11, 2024
@compiler-errors compiler-errors force-pushed the additional-fixes branch 2 times, most recently from b07ad64 to 79b89af Compare April 18, 2024 15:25
@fmease
Copy link
Member

fmease commented Apr 21, 2024

r? fmease

@rustbot rustbot assigned fmease and unassigned wesleywiser Apr 21, 2024
@bors
Copy link
Contributor

bors commented Apr 26, 2024

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

Copy link
Member

@fmease fmease left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for untangling this code 🙏 I have some notes but otherwise looks good

};

if let Some((fn_id, fn_decl, can_suggest)) = fn_decl {
if let Some((fn_id, fn_decl, can_suggest)) = fcx.get_fn_decl(parent_id) {
Copy link
Member

@fmease fmease May 2, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(get_fn_decl does more than get_node_fn_decl as the former only calls the latter if get_return_block returns Some but that seems more robust anyway)

compiler/rustc_hir_typeck/src/fn_ctxt/_impl.rs Outdated Show resolved Hide resolved
tests/ui/typeck/issue-81943.stderr Show resolved Hide resolved
@fmease fmease 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 May 2, 2024
Copy link
Member

@fmease fmease left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r=me with my question addressed in one way or another, a rebase & maybe after squashing some of the commits, dunno, as you please

@compiler-errors
Copy link
Member Author

I only saw one actionable request for a change, so I fixed that

@bors r=fmease

@bors
Copy link
Contributor

bors commented May 21, 2024

📌 Commit a2a6fe7 has been approved by fmease

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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels May 21, 2024
@bors
Copy link
Contributor

bors commented May 21, 2024

⌛ Testing commit a2a6fe7 with merge e875391...

@bors
Copy link
Contributor

bors commented May 21, 2024

☀️ Test successful - checks-actions
Approved by: fmease
Pushing e875391 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label May 21, 2024
@bors bors merged commit e875391 into rust-lang:master May 21, 2024
7 checks passed
@rustbot rustbot added this to the 1.80.0 milestone May 21, 2024
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (e875391): 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)
1.1% [0.6%, 1.8%] 3
Regressions ❌
(secondary)
0.2% [0.1%, 0.2%] 6
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-1.1% [-1.1%, -1.1%] 2
All ❌✅ (primary) 1.1% [0.6%, 1.8%] 3

Max RSS (memory usage)

Results (primary 5.2%, secondary 3.3%)

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

Cycles

Results (primary 2.4%, secondary 3.2%)

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.4% [1.4%, 3.6%] 3
Regressions ❌
(secondary)
3.2% [3.1%, 3.3%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 2.4% [1.4%, 3.6%] 3

Binary size

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

Bootstrap: 670.966s -> 669.761s (-0.18%)
Artifact size: 315.42 MiB -> 316.16 MiB (0.23%)

@rustbot rustbot added the perf-regression Performance regression. label May 21, 2024
@rylev
Copy link
Member

rylev commented May 21, 2024

@compiler-errors @fmease seems like the regression in regex caused the typeck query to almost double in time. Perhaps this is worth investigating?

@Mark-Simulacrum
Copy link
Member

It looks to me like there's a bunch of new queries, including metadata decoding running. I don't see at a quick skim where there was an intent to deserialize/load more state in order to perform the evaluation here though.

Given that it's limited to just one benchmark though it's not clear whether it's worth investigating. Not marking as triaged though, I think at least a brief look from author would be helpful.

@compiler-errors
Copy link
Member Author

None of this should be being called on the good path? 🤔

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

8 participants