-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
[MIR] Make InlineAsm a Statement #39854
Conversation
Previously InlineAsm was an Rvalue, but its semantics doesn’t really match the semantics of an Rvalue – rather it behaves more like a Statement.
} | ||
// FIXME: rvalue with undeterminable type - e.g. AggregateKind::Array branch that | ||
// returns `None`. |
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.
If I understand correctly, this case (the only remaining case that returns None
now that InlineAsm
is gone) is for empty arrays. I think that returning [!; 0]
would be the correct behavior, removing the need to return an Option
.
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.
At least currently [T; 0]
is not a subtype of [!; 0]
so no, that would not work.
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 the problem is that Array
ought to carry the type of its elements.
@bors r+ |
📌 Commit 4a3c66a has been approved by |
Thanks @nagisa ! |
[MIR] Make InlineAsm a Statement Previously InlineAsm was an Rvalue, but its semantics doesn’t really match the semantics of an Rvalue – rather it behaves more like a Statement. r? @nikomatsakis you wanted this to happen
[MIR] Make InlineAsm a Statement Previously InlineAsm was an Rvalue, but its semantics doesn’t really match the semantics of an Rvalue – rather it behaves more like a Statement. r? @nikomatsakis you wanted this to happen
[MIR] Make InlineAsm a Statement Previously InlineAsm was an Rvalue, but its semantics doesn’t really match the semantics of an Rvalue – rather it behaves more like a Statement. r? @nikomatsakis you wanted this to happen
@bors: retry |
[MIR] Make InlineAsm a Statement Previously InlineAsm was an Rvalue, but its semantics doesn't really match the semantics of an Rvalue - rather it behaves more like a Statement. r? @nikomatsakis you wanted this to happen
☀️ Test successful - status-appveyor, status-travis |
Previously InlineAsm was an Rvalue, but its semantics doesn't really match the semantics of an
Rvalue - rather it behaves more like a Statement.
r? @nikomatsakis you wanted this to happen