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

Gate unsigned unary negate #23945

Merged
merged 9 commits into from Apr 2, 2015

Conversation

Projects
None yet
6 participants
@pnkfelix
Copy link
Member

pnkfelix commented Apr 1, 2015

Feature-gate unsigned unary negate.

Discussed in weekly meeting here: https://github.com/rust-lang/meeting-minutes/blob/master/weekly-meetings/2015-03-31.md#feature-gate--expr

and also in the internals thread here: http://internals.rust-lang.org/t/forbid-unsigned-integer/752

Also, one might rightfully point out that this is fallout from rust-lang/rfcs#560 , which has tracking issue #22020

@rust-highfive

This comment has been minimized.

Copy link
Collaborator

rust-highfive commented Apr 1, 2015

r? @aturon

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

@pnkfelix

This comment has been minimized.

Copy link
Member Author

pnkfelix commented Apr 1, 2015

r? @nikomatsakis

bootstraps

(and I'm running make check locally now.)

Obviously in need of a rebase too, though.

@rust-highfive rust-highfive assigned nikomatsakis and unassigned aturon Apr 1, 2015

@pnkfelix

This comment has been minimized.

Copy link
Member Author

pnkfelix commented Apr 1, 2015

(also I forgot to remove the Neg impl for unsigned types, as discussed in the internals thread. I'll do that too.)

@nikomatsakis

This comment has been minimized.

Copy link
Contributor

nikomatsakis commented Apr 1, 2015

r+ if we remove the impl

@pnkfelix pnkfelix force-pushed the pnkfelix:gate-u-negate branch from 856804a to a98e471 Apr 1, 2015

@pnkfelix

This comment has been minimized.

Copy link
Member Author

pnkfelix commented Apr 1, 2015

Removed the Neg impls and rebased, but still need to run make check locally now ... :(

@alexcrichton what is our rollup schedule? I.e. what is expected deadline for beta, has it passed?

@alexcrichton

This comment has been minimized.

Copy link
Member

alexcrichton commented Apr 1, 2015

We should be able to land everything so long as it's in the queue in the next 3.5 hours (and maybe even slightly after!)

@pnkfelix pnkfelix force-pushed the pnkfelix:gate-u-negate branch from 5fbbe9e to 95d3512 Apr 1, 2015

@pnkfelix pnkfelix force-pushed the pnkfelix:gate-u-negate branch from 95d3512 to 1c11748 Apr 1, 2015

Fix bug in `OverflowOps` impl for unsigned integers.
Namely, the special case treatment for `div`/`rem` is only applicable
to signed integer values.

Clearly RFC 1027 would have saved us here!  ;)

@pnkfelix pnkfelix added this to the 1.0 beta milestone Apr 1, 2015

@pnkfelix

This comment has been minimized.

Copy link
Member Author

pnkfelix commented Apr 1, 2015

(adding to 1.0 beta milestone so that it does not get forgotten by accident. Though it may well get discarded by choice, if this local bootstrap does not get finished soon... how on earth is the compiler so slow for me ...)

alexcrichton added a commit to alexcrichton/rust that referenced this pull request Apr 1, 2015

@pnkfelix

This comment has been minimized.

Copy link
Member Author

pnkfelix commented Apr 1, 2015

@alexcrichton reports that this commit alexcrichton@6fe1233 gets him through make check; I am trying to cherry-pick that to my own repo now; will push in a minute...

Test fixes and rebase conflicts, round 2
Conflicts:
	src/libcore/num/mod.rs

@pnkfelix pnkfelix force-pushed the pnkfelix:gate-u-negate branch from 73e0d88 to f86318d Apr 2, 2015

@pnkfelix

This comment has been minimized.

Copy link
Member

pnkfelix commented on src/libstd/fs.rs in f86318d Apr 2, 2015

hey @alexcrichton is this ... okay? I would have assumed that -1 is/was some sort of error signal? is this just old code that is now buggy?

This comment has been minimized.

Copy link
Member Author

alexcrichton replied Apr 2, 2015

Yeah this test is pretty ancient and it's not really necessary any more, -1 in theory means that it successfully read uint::MAX bytes (bad)

@pnkfelix

This comment has been minimized.

Copy link
Member Author

pnkfelix commented Apr 2, 2015

r=nikomatsakis f86318d

@alexcrichton

This comment has been minimized.

Copy link
Member

alexcrichton commented Apr 2, 2015

@bors: r=nikomatsakis f86318d

bors added a commit that referenced this pull request Apr 2, 2015

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Apr 2, 2015

⌛️ Testing commit f86318d with merge 77b5a3f...

alexcrichton added a commit to alexcrichton/rust that referenced this pull request Apr 2, 2015

bors added a commit that referenced this pull request Apr 2, 2015

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Apr 2, 2015

⌛️ Testing commit f86318d with merge 207bb63...

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Apr 2, 2015

⛄️ The build was interrupted to prioritize another pull request.

bors added a commit that referenced this pull request Apr 2, 2015

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Apr 2, 2015

⌛️ Testing commit f86318d with merge 9e5b5bd...

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Apr 2, 2015

⛄️ The build was interrupted to prioritize another pull request.

bors added a commit that referenced this pull request Apr 2, 2015

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Apr 2, 2015

⌛️ Testing commit f86318d with merge cccfe38...

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Apr 2, 2015

⛄️ The build was interrupted to prioritize another pull request.

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Apr 2, 2015

⌛️ Testing commit f86318d with merge 35b0653...

bors added a commit that referenced this pull request Apr 2, 2015

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Apr 2, 2015

⛄️ The build was interrupted to prioritize another pull request.

bors added a commit that referenced this pull request Apr 2, 2015

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Apr 2, 2015

⌛️ Testing commit f86318d with merge 4ae7033...

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Apr 2, 2015

⛄️ The build was interrupted to prioritize another pull request.

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Apr 2, 2015

⌛️ Testing commit f86318d with merge 299333b...

bors added a commit that referenced this pull request Apr 2, 2015

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Apr 2, 2015

⛄️ The build was interrupted to prioritize another pull request.

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Apr 2, 2015

⌛️ Testing commit f86318d with merge ce5c99a...

bors added a commit that referenced this pull request Apr 2, 2015

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Apr 2, 2015

💔 Test failed - auto-mac-64-opt

@bors bors merged commit f86318d into rust-lang:master Apr 2, 2015

1 of 2 checks passed

homu Test failed
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

andersk added a commit to andersk/image-rs that referenced this pull request Apr 3, 2015

Remove Neg from Num trait
As per rust-lang/rust#23945, Neg is no longer
implemented for unsigned types.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>

andersk added a commit to andersk/image-rs that referenced this pull request Apr 3, 2015

Remove Neg from Num trait
As per rust-lang/rust#23945, Neg is no longer
implemented for unsigned types.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>

andersk added a commit to andersk/nalgebra-rs that referenced this pull request Apr 3, 2015

Remove Neg from BaseNum
As per rust-lang/rust#23945, Neg is no longer
implemented for unsigned types.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>

@andersk andersk referenced this pull request Apr 3, 2015

Merged

Remove Neg from BaseNum #114

@lgrz lgrz referenced this pull request Apr 20, 2015

Closed

audit: ensure every gated feature has a compile-fail test #22820

27 of 40 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.