Skip to content

Force appropriate extension when converting from int to ptr #43291 #47147

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

Merged
merged 1 commit into from
Jan 4, 2018

Conversation

projektir
Copy link
Contributor

@projektir projektir commented Jan 3, 2018

Fixes #43291.

Looking for feedback if I've missed something and/or need to add more tests.

@eddyb @retep998 @nagisa @oli-obk

@rust-highfive
Copy link
Contributor

r? @petrochenkov

(rust_highfive has picked a reviewer for you, use r? to override)

assert_eq!(!0usize as *const (), (0i32 - 1) as *const ());
}

pub fn foo(a: i32, b: i32) -> *const () {
Copy link
Member

Choose a reason for hiding this comment

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

You should change all occurrences of i32 in this test with i8, to ensure its generality.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

@projektir
Copy link
Contributor Author

I'll rebase when everything looks good.

@eddyb
Copy link
Member

eddyb commented Jan 3, 2018

@bors r+

@bors
Copy link
Collaborator

bors commented Jan 3, 2018

📌 Commit 6536d36 has been approved by eddyb

@nagisa nagisa added relnotes Marks issues that should be documented in the release notes of the next release. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-lang Relevant to the language team, which will review and decide on the PR/issue. and removed T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jan 3, 2018
@petrochenkov petrochenkov added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Jan 3, 2018
@petrochenkov petrochenkov assigned eddyb and unassigned petrochenkov Jan 3, 2018
@bors
Copy link
Collaborator

bors commented Jan 4, 2018

⌛ Testing commit 6536d36 with merge 4cd918c...

bors added a commit that referenced this pull request Jan 4, 2018
Force appropriate extension when converting from int to ptr #43291

Fixes #43291.

Looking for feedback if I've missed something and/or need to add more tests.

@eddyb @retep998 @nagisa @oli-obk
@bors
Copy link
Collaborator

bors commented Jan 4, 2018

☀️ Test successful - status-appveyor, status-travis
Approved by: eddyb
Pushing 4cd918c to master...

@bors bors merged commit 6536d36 into rust-lang:master Jan 4, 2018
@projektir projektir deleted the to_ptr_cast branch January 4, 2018 18:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
relnotes Marks issues that should be documented in the release notes of the next release. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-lang Relevant to the language team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants