Skip to content

Make rand compile with nightly#93

Closed
fhahn wants to merge 1 commit into
rust-random:masterfrom
fhahn:fix-ind
Closed

Make rand compile with nightly#93
fhahn wants to merge 1 commit into
rust-random:masterfrom
fhahn:fix-ind

Conversation

@fhahn

@fhahn fhahn commented Jan 5, 2016

Copy link
Copy Markdown
Contributor

When compiling rand with the current nightly it fails because Rustc cannot find the correct type for the second operand of the wrapping shift operation:

src/isaac.rs:134:37: 134:48 error: the type of this value must be known in this context
src/isaac.rs:134             ($x:expr) => ( self.mem[($x >> 2).0 as usize & (RAND_SIZE_USIZE - 1)] )
src/isaac.rs:373:42: 373:53 error: the type of this value must be known in this context
 src/isaac.rs:373                 *self.mem.get_unchecked((($x >> 3).0 as usize) & (RAND_SIZE_64 - 1))

This PR adds an explicit cast to usize to fix this, but this may be a regression worth reporting upstream?

@tomjakubowski

Copy link
Copy Markdown

👍 for reporting this upstream (I would do it but I don't know enough about this particular regression).

@numerodix

Copy link
Copy Markdown
Contributor

Same as #92

@fhahn

fhahn commented Jan 5, 2016

Copy link
Copy Markdown
Contributor Author

@numerodix 👍 you were a little bit faster. I'll close my PR.

It's already reported upstream

@brson

brson commented Jan 6, 2016

Copy link
Copy Markdown
Contributor

I filed the regression in Rust. We should probably fix that.

@brson

brson commented Jan 6, 2016

Copy link
Copy Markdown
Contributor

@fhahn Oh, you said it was reported upstream. Do you have a link?

@erickt

erickt commented Jan 6, 2016

Copy link
Copy Markdown
Contributor

@brson: I think it's rust-lang/rust#30713.

@brson

brson commented Jan 7, 2016

Copy link
Copy Markdown
Contributor

rust-lang/rust#30733 should fix this

@sfackler

sfackler commented Jan 7, 2016

Copy link
Copy Markdown
Contributor

Can we merge this thing? New nightlies have not landed for the last couple of days, and I believe this is blocking getting serde in a good place. cc @erickt

@steveklabnik

Copy link
Copy Markdown
Contributor

It was fixed in Rust a few hours ago, so tomorrow it should build without the patch. At least, that's what I thought.

On Jan 7, 2016, 13:21 -0500, Steven Facklernotifications@github.com, wrote:

Can we merge this thing? New nightlies have not landed for the last couple of days, and I believe this is blocking getting serde in a good place. cc@erickt(https://github.com/erickt)


Reply to this email directly orview it on GitHub(#93 (comment)).

@andrew-d

andrew-d commented Jan 8, 2016

Copy link
Copy Markdown

👍 on merging anyway - fixing rustc is obviously the best way to go about this, but having builds be broken in the mean time has been somewhat frustrating.

@Manishearth

Copy link
Copy Markdown
Contributor

The nightlies are broken so this still isn't fixed. Could someone merge and publish this? A lot of crates are broken because of this.

cc @alexcrichton

@alexcrichton

Copy link
Copy Markdown
Contributor

Looks like #92 beat this to the bunch, so closing, but thanks!

@steveklabnik

Copy link
Copy Markdown
Contributor

The linux dist bot timed out :(

On Sat, Jan 9, 2016 at 12:58 PM, Alex Crichton notifications@github.com
wrote:

Closed #93 #93.


Reply to this email directly or view it on GitHub
#93 (comment).

@fhahn fhahn deleted the fix-ind branch January 10, 2016 10:58
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.

10 participants