-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Be careful about expr_ty_adjusted
when noting block tail type
#101629
Conversation
r? @jackh726 (rust-highfive has picked a reviewer for you, use r? to override) |
@@ -2713,12 +2713,13 @@ impl<'a, 'tcx> InferCtxtExt<'tcx> for InferCtxt<'a, 'tcx> { | |||
Some(t) if t.hir_owner == parent_id => t, | |||
_ => self.tcx.typeck(parent_id), | |||
}; | |||
let ty = typeck_results.expr_ty_adjusted(expr); | |||
let span = expr.peel_blocks().span; | |||
let expr = expr.peel_blocks(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
peeling first then looking for the expr lets us recover the type in ruby_style_closure
, but it's still insufficient for the UI test I added, but oh well. It's probably just not being recorded for some other typeck reason.
@bors r+ |
⌛ Testing commit 44738ee with merge d7922d3b8e798386b12d93d2b6622f877328719e... |
💔 Test failed - checks-actions |
The job Click to see the possible cause of the failure (guessed by this bot)
|
@bors retry the test failure doesn't look related |
☀️ Test successful - checks-actions |
Finished benchmarking commit (503e19d): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)ResultsThis 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.
CyclesResultsThis 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.
Footnotes |
Fixes #101623