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

[MIR] Make InlineAsm a Statement #39854

Merged
merged 1 commit into from
Feb 18, 2017
Merged

[MIR] Make InlineAsm a Statement #39854

merged 1 commit into from
Feb 18, 2017

Conversation

nagisa
Copy link
Member

@nagisa nagisa commented Feb 15, 2017

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

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`.
Copy link
Contributor

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.

Copy link
Member Author

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.

Copy link
Contributor

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.

@nikomatsakis
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented Feb 16, 2017

📌 Commit 4a3c66a has been approved by nikomatsakis

@nikomatsakis
Copy link
Contributor

Thanks @nagisa !

GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Feb 16, 2017
[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
frewsxcv added a commit to frewsxcv/rust that referenced this pull request Feb 17, 2017
[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
frewsxcv added a commit to frewsxcv/rust that referenced this pull request Feb 17, 2017
[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
@alexcrichton
Copy link
Member

@bors: retry

@bors
Copy link
Contributor

bors commented Feb 18, 2017

⌛ Testing commit 4a3c66a with merge 9f1762a...

bors added a commit that referenced this pull request Feb 18, 2017
[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
Copy link
Contributor

bors commented Feb 18, 2017

☀️ Test successful - status-appveyor, status-travis
Approved by: nikomatsakis
Pushing 9f1762a to master...

@bors bors merged commit 4a3c66a into rust-lang:master Feb 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants