Skip to content

ir: Don't assume wchar is 2 bytes. - #1346

Merged
bors-servo merged 1 commit into
rust-lang:masterfrom
emilio:wchar
Jul 6, 2018
Merged

bors-servo merged 1 commit into
rust-lang:masterfrom
emilio:wchar

Conversation

@emilio

@emilio emilio commented Jul 5, 2018

Copy link
Copy Markdown
Contributor

Fixes #1345

@emilio

emilio commented Jul 5, 2018

Copy link
Copy Markdown
Contributor Author

r? @fitzgen

@fitzgen fitzgen left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with one question inline below. Thanks @emilio :)

Comment thread src/codegen/mod.rs
IntKind::ULongLong => Ok(raw_type(ctx, "c_ulonglong")),
IntKind::WChar { size } => {
let ty = Layout::known_type_for_size(size)
.expect("Non-representable wchar_t?");

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this really something we should expect vs return an Err?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I think we should always be able to represent it.

If there's no sufficiently large rust type to represent multi-byte characters I want to know why :)

@emilio

emilio commented Jul 6, 2018

Copy link
Copy Markdown
Contributor Author

@bors-servo r=fitzgen

@bors-servo

Copy link
Copy Markdown

📌 Commit b3e41a2 has been approved by fitzgen

@bors-servo

Copy link
Copy Markdown

⌛ Testing commit b3e41a2 with merge 6a480ff...

bors-servo pushed a commit that referenced this pull request Jul 6, 2018
ir: Don't assume wchar is 2 bytes.

Fixes #1345
@bors-servo

Copy link
Copy Markdown

☀️ Test successful - status-travis
Approved by: fitzgen
Pushing 6a480ff to master...

@bors-servo
bors-servo merged commit b3e41a2 into rust-lang:master Jul 6, 2018
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.

4 participants