Skip to content

Conversation

@pcwalton
Copy link
Contributor

No description provided.

@pcwalton
Copy link
Contributor Author

r? @catamorphism

@catamorphism
Copy link
Contributor

Looks ok for the most part as far as I can tell, but it's a relatively large amount of code with relatively few comments. I'd just encourage adding more comments before you commit.

r+

@pcwalton
Copy link
Contributor Author

r? @catamorphism

@pcwalton pcwalton closed this Oct 17, 2012
RalfJung pushed a commit to RalfJung/rust that referenced this pull request Aug 5, 2024
Use Scalar consistently in foreign item emulation

Step 0 of rust-lang#3772

This just makes the code consistent. While we could also go for consistency the other way, that would only allow us to use integers in some cases where we use `Scalar` right now, because `Scalar` can also hold pointers where applicable.

There's also no danger in messing up (even though we do lose some compile-time checks), as `Scalar` knows the size of the integer stored within, so it will check that against the destination when it is written. In fact, this makes the checks much stronger compared with `write_int`, which just checks that the integer fits into the destination size.
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.

3 participants