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

Be careful about expr_ty_adjusted when noting block tail type #101629

Merged
merged 1 commit into from
Sep 19, 2022

Conversation

compiler-errors
Copy link
Member

Fixes #101623

@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Sep 9, 2022
@rust-highfive
Copy link
Contributor

r? @jackh726

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 9, 2022
@@ -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();
Copy link
Member Author

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.

@sanxiyn
Copy link
Member

sanxiyn commented Sep 18, 2022

@bors r+

@bors
Copy link
Collaborator

bors commented Sep 18, 2022

📌 Commit 44738ee has been approved by sanxiyn

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 Sep 18, 2022
@bors
Copy link
Collaborator

bors commented Sep 19, 2022

⌛ Testing commit 44738ee with merge d7922d3b8e798386b12d93d2b6622f877328719e...

@bors
Copy link
Collaborator

bors commented Sep 19, 2022

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Sep 19, 2022
@rust-log-analyzer
Copy link
Collaborator

The job x86_64-gnu-aux failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
error: process exited with code 101 (expected 0)
--- stdout

--- stderr
error: could not execute process `/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/tmp/cit/t2437/lib/./foo -vV` (never executed)
Caused by:
  Text file busy (os error 26)
', src/tools/cargo/tests/testsuite/workspaces.rs:2176:42

---
test result: FAILED. 2467 passed; 1 failed; 142 ignored; 0 measured; 0 filtered out; finished in 79.49s

error: test failed, to rerun pass '--test testsuite'
Build completed unsuccessfully in 0:21:42
make: *** [Makefile:44: check-aux] Error 1

@compiler-errors
Copy link
Member Author

@bors retry the test failure doesn't look related

@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 Sep 19, 2022
@bors
Copy link
Collaborator

bors commented Sep 19, 2022

⌛ Testing commit 44738ee with merge 503e19d...

@bors
Copy link
Collaborator

bors commented Sep 19, 2022

☀️ Test successful - checks-actions
Approved by: sanxiyn
Pushing 503e19d to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Sep 19, 2022
@bors bors merged commit 503e19d into rust-lang:master Sep 19, 2022
@rustbot rustbot added this to the 1.66.0 milestone Sep 19, 2022
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (503e19d): 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.

mean1 range count2
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
4.1% [4.1%, 4.1%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-3.0% [-3.0%, -3.0%] 1
All ❌✅ (primary) - - 0

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.

mean1 range count2
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
2.3% [2.3%, 2.3%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Footnotes

  1. the arithmetic mean of the percent change 2

  2. number of relevant changes 2

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.

ICE: no type for node
8 participants