-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Deprecating i/u suffixes in libcoretest #21895
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
Conversation
r? @brson (rust_highfive has picked a reviewer for you, use r? to override) |
@@ -18,7 +18,7 @@ static TEST: &'static str = "Test"; | |||
|
|||
#[test] | |||
fn any_referenced() { | |||
let (a, b, c) = (&5u as &Any, &TEST as &Any, &Test as &Any); | |||
let (a, b, c) = (&5 as &Any, &TEST as &Any, &Test as &Any); | |||
|
|||
assert!(a.is::<uint>()); |
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.
That needs more fixing.
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.
This makes the the literal a u32
, but later it's checked if it's a uint
.
@tbu- could you please elaborate? |
I think type inference knows it's a uint as 'make check' passed all tests. |
Let me claim that this is impossible or a bug in the type inference. |
Prints:
|
If you use |
What's the default, as I didn't use -j? |
Default should be fine. But have you seen my code snippet that demonstrates that this test cannot succeed? |
Yeah, you're definitely correct. I was just worried about how my tests were passing. And if so, there must be other commits out there that aren't being caught too. I'll fix my change... but why did make check pass?! Edit: I'll make check again without the fix and review the output. |
Looking at the output, there is zero mention of libcoretest. So I guess these tests aren't even run with 'make check'? |
Mh. They should be. |
Oh, this explains so much :( cfg: antlr4 not available, skipping lexer test... Installing and running tests again. Sorry for the run around. |
Well this is weird. libcoretests are definately not firing on my local machine. I've made a post on internal: http://internals.rust-lang.org/t/make-check-not-firing-libcoretest-tests/1534 |
@Alfie These error messages should have nothing to do with |
Yep. I upgraded Valgrind and now something completely unrelated is failing:
So back to the drawing board - now that I have all dependencies (flex, bison, antlr4 and valgrind were missing or old), I'm currently running 'make check' on upstream's master to see if there's anything else wrong with my local machine before continuing with this PR. |
@tbu- sorry about the delay. Worked out everything I needed, and was able to identify all the issues. Make check happy now, so this PR is good to go. |
@@ -18,7 +18,7 @@ static TEST: &'static str = "Test"; | |||
|
|||
#[test] | |||
fn any_referenced() { | |||
let (a, b, c) = (&5u as &Any, &TEST as &Any, &Test as &Any); | |||
let (a, b, c) = (&5us as &Any, &TEST as &Any, &Test as &Any); |
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.
This should probably be changed to use i32
, there's no need for a platform dependent integer type here.
Except for the one note I left, this looks fine. |
Thanks for the suggestion, but I tried modifying as you said (5us to 5i32) and it failed:
So unless you have any other suggestions, 1f00690 was the last one that passed all tests. |
I.e. change all the checks for |
@tbu- Ahh I see. I only wanted the bare minimum (so only changing the suffixes), but that one makes sense. Fixed now. Thanks! |
ping @tbu- |
Great to see it landed. Thanks for your contribution. :) |
No description provided.