-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Stabilize 128-bit integers 🎉 #49101
Stabilize 128-bit integers 🎉 #49101
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
What does this tidy error mean?
|
I'm also getting this error:
|
For the latter error, it looks like |
Here's the line: https://github.com/rust-lang-nursery/compiler-builtins/blob/266ea0740a5bdd262a38bbd88fb55fc3d2a7a96e/src/lib.rs#L15 Unfortunately it's in a submodule (different repository) so I don't think there's a good way to simultaneously change them. |
@@ -0,0 +1,18 @@ | |||
# `repri128` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/repri128/repr128
src/libsyntax/diagnostic_list.rs
Outdated
@@ -261,10 +264,11 @@ If you're using a nightly version of rustc, just add the corresponding feature | |||
to be able to use it: | |||
|
|||
``` | |||
#![feature(i128)] | |||
#![feature(repri128)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/repri128/repr128
src/libsyntax/diagnostic_list.rs
Outdated
@@ -250,7 +250,10 @@ An unstable feature was used. | |||
Erroneous code example: | |||
|
|||
```compile_fail,E658 | |||
let x = ::std::u128::MAX; // error: use of unstable library feature 'i128' | |||
#[repr(u128)] // error: use of unstable library feature 'i128' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: language feature repr128
src/test/ui/error-codes/E0658.stderr
Outdated
@@ -4,7 +4,7 @@ error[E0658]: use of unstable library feature 'i128' (see issue #35118) | |||
LL | let _ = ::std::u128::MAX; //~ ERROR E0658 | |||
| ^^^^^^^^^^^^^^^^ | |||
| | |||
= help: add #![feature(i128)] to the crate attributes to enable | |||
= help: add #![feature(repri128)] to the crate attributes to enable |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/repri128/repr128
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Er, shouldn't this test be testing another feature now :P
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, the whole stderr needs to change... I will fix this one after I get the rest compiling successfully.
@@ -10,20 +10,20 @@ | |||
|
|||
// gate-test-i128_type | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not remove the i128_type
tests?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left this one as a test for the repr128 gate.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, it looks like there is already a test for that.
@@ -11,7 +11,7 @@ | |||
// Tests saturating float->int casts. See u128-as-f32.rs for the opposite direction. | |||
// compile-flags: -Z saturating-float-casts | |||
|
|||
#![feature(test, i128, i128_type, stmt_expr_attributes)] | |||
#![feature(test, i128, stmt_expr_attributes)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Stray feature(i128)
left behind.
src/test/run-pass/u128-as-f32.rs
Outdated
@@ -10,7 +10,7 @@ | |||
|
|||
// ignore-emscripten u128 not supported | |||
|
|||
#![feature(test, i128, i128_type)] | |||
#![feature(test, i128)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Stray feature(i128)
left behind.
Regarding the first tidy failure, it looks like you forgot to change a few items to |
@@ -10,20 +10,20 @@ | |||
|
|||
// gate-test-i128_type |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You'll probably have to remove this line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks :) I removed the test altogether since there is already a test for the repr128 gate.
r? @nagisa or @alexcrichton |
Thanks @goodmanjonathan and @PlasmaPower ! I am fixing those things now :) |
Hmm... I am still getting this tidy error:
But I fixed that line? |
Re: #49101 (comment) How do I actually fix this? Every time |
I'd get the change on a different branch or the submodule's repository, then change the submodule's to point to that branch. I'm not sure if that's the right way to do this though. |
@mark-i-m Add (Using |
I’ll review this after I get some sleep. |
Travis build is now failing because of the compiler_builtins error. Should I make a PR to that repo? |
Ok, I think the compiler_builtins error should be the last thing stopping this PR. |
Made a PR on compiler_builtins |
e378466
to
140bf94
Compare
@nagisa Travis is passing again. nth try is the charm? |
@bors r=nagisa |
📌 Commit 140bf94 has been approved by |
Stabilize 128-bit integers 🎉 cc #35118 EDIT: This should be merged only after the following have been merged: - [x] rust-lang/compiler-builtins#236 - [x] rust-lang/book#1230
☀️ Test successful - status-appveyor, status-travis |
FWIW, here are additional files in rustc that as of 2018.05.12 did not handle usize == u128, which will be needed by RISC-V with RV128I option when LLVM or some other backend supports it. The grep string (between « and ») was «#[cfg(target_pointer_width = "(16|32|64|128)")]»
|
@Tom-Phinney it would be best to file an issue about this as inside this PR thread this is likely going to get lost. |
cc #35118
EDIT: This should be merged only after the following have been merged: