-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Allow inference regions when relating consts #73225
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// check-pass | ||
// edition:2018 | ||
|
||
#[allow(unused)] | ||
async fn foo<'a>() { | ||
let _data = &mut [0u8; { 1 + 4 }]; | ||
bar().await | ||
} | ||
Comment on lines
+5
to
+8
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Weird that this would need There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I can't get it to ICE: playground The ICE happened when unifying the generator witness with the generator type (IIRC?), so maybe there's something special about that operation. |
||
|
||
async fn bar() {} | ||
|
||
fn main() {} |
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.
I think this makes sense. I left that FIXME comment (and the one below) while working on an unrelated PR #71049 (and glancing at code next to what I was touching). I should've probably filed issues.
At least I don't think this FIXME was a soundness problem, the overzealous check could only lead to types failing to equate (which could mean ICEs, clearly it happened here so it's possible).
This is reminiscent of #70773, where missing normalizations started showing up after we stopped ignoring generics in scope, in #70452.
I wonder if changing this one piece of code in
relate
makes the extra normalizations added to fix #70773 unnecessary.