Uh oh!
There was an error while loading. Please reload this page.
Do not ICE when combining unsized locals and async - #64527
Conversation
rust-highfive
commented
Sep 16, 2019
(rust_highfive has picked a reviewer for you, use r? to override) |
There was a problem hiding this comment.
We could add an if ty.is_generator() here, which would ensure the correct error is emitted, and just ICE in any other (in theory unreachable) case.
| } | ||
| Err(LayoutError::Unsized(_ty)) => { | ||
| let sp = statement.source_info.span; // async fn block | ||
| self.tcx.sess.struct_span_err( |
There was a problem hiding this comment.
Uhm; const_prop is too my knowledge an optimization transform not necessary for correctness so why are we emitting an error here?
There was a problem hiding this comment.
Yea I think it's totally fine to just keep doing what the old code did and ignore errors. They may be occuring because we're in a generic function and may be bogus for specific concrete types
There was a problem hiding this comment.
Should we close this PR then?
There was a problem hiding this comment.
Well; we cannot merge this PR as-is I think but maybe we can morph the PR into something else. You can always open a new one tho... up to you. :)
rust-highfive
commented
Sep 16, 2019
The job Click to expand the log.I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
| ) -> Result<DiagnosticBuilder<'tcx>, ErrorHandled> { | ||
| let must_error = match self.error { | ||
| err_inval!(Layout(LayoutError::Unknown(_))) | | ||
| err_inval!(Layout(LayoutError::Unsized(_))) | |
There was a problem hiding this comment.
An unsized type isnt generic, so returning TooGeneric doesnt make sense.
There was a problem hiding this comment.
But that's also why this entire approach looks odd... a generic type will eventually be monomorphized, so that's a program that cannot be executed now but can be executed later. But if the type is unsized now it will always be unsized, right, so why does it make any sense to delay the error?
There was a problem hiding this comment.
yea that should just be reported via the machinery below, which should simplify the rest
bors
commented
Sep 28, 2019
☔ The latest upstream changes (presumably #64419) made this pull request unmergeable. Please resolve the merge conflicts. |
JohnCSimon
commented
Oct 5, 2019
Ping from triage |
JohnCSimon
commented
Oct 12, 2019
Pinging again from triage |
Centril
commented
Oct 16, 2019
This hasn't seen any movement for some time so I'm going to close it out as inactive. |
Fix#61335.