Skip to content

Remove unused files from libcoretest #29079

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

Merged
merged 1 commit into from
Oct 17, 2015

Conversation

fhahn
Copy link
Contributor

@fhahn fhahn commented Oct 15, 2015

While working on #28711 I found out that

  • src/libcoretest/clone.rs
  • src/libcoretest/fmt/float.rs
  • src/libcoretest/intrinsics.rs

are not used. I am not sure if removing them is the right way to go. If it makes sense to keep (and fix and enable) them, I would be happy to update the PR.

@rust-highfive
Copy link
Contributor

r? @brson

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

@brson
Copy link
Contributor

brson commented Oct 15, 2015

It looks to me like they should be added to coretest since these tests don't exist anywhere else. Can you add them back to the crate?

@fhahn fhahn force-pushed the remove-unused-files-libcoretest branch 2 times, most recently from 1f1c4e3 to 6aa5237 Compare October 15, 2015 20:55
@fhahn
Copy link
Contributor Author

fhahn commented Oct 15, 2015

Yeah that makes sense. I've updated the PR. I only changed int to i32 and had to remove a test which used clone() on functions (I am not sure, is something like this still supported?)

@alexcrichton
Copy link
Member

@bors: r+ 6aa5237

Yay!

@bors
Copy link
Collaborator

bors commented Oct 16, 2015

⌛ Testing commit 6aa5237 with merge 3687c5f...

Manishearth added a commit to Manishearth/rust that referenced this pull request Oct 16, 2015
…st, r=alexcrichton

While working on rust-lang#28711 I found out that 

*  src/libcoretest/clone.rs 
* src/libcoretest/fmt/float.rs  
* src/libcoretest/intrinsics.rs 

are not used. I am not sure if removing them is the right way to go. If it makes sense to keep (and fix and enable) them, I would be happy to update the PR.
@bors
Copy link
Collaborator

bors commented Oct 16, 2015

⛄ The build was interrupted to prioritize another pull request.

@bors
Copy link
Collaborator

bors commented Oct 16, 2015

⌛ Testing commit 6aa5237 with merge a668a03...

@bors
Copy link
Collaborator

bors commented Oct 16, 2015

💔 Test failed - auto-mac-32-opt

@fhahn
Copy link
Contributor Author

fhahn commented Oct 16, 2015

It seems like to rounding behavior has changed: format!("{:.1}" , 9.85f64) prints 9.8 instead of the expected 9.9. Is this a regression? According to the documentation , round() should round half-way cases away from zero. format!("{:.1}" , 9.851f64) generates 9.9 as expected.

@alexcrichton
Copy link
Member

I believe that's probably because 9.85 isn't representable as a float, for example:

$ cat foo.rs
fn main() {
    let a = 9.85;
    println!("{}", a);
}
$ rustc -g foo.rs
$ lldb ./foo
(lldb) target create "./foo"
bCurrent executable set to './foo' (x86_64).
(lldb) b foo.rs:3
Breakpoint 1: where = foo`foo::main + 107 at foo.rs:3, address = 0x000000010000156b
(lldb) r
Process 98510 launched: './foo' (x86_64)
Process 98510 stopped
* thread #1: tid = 0xdf51c, 0x000000010000156b foo`foo::main + 107 at foo.rs:3, queue = 'com.apple.main-thread', stop reason = breakpoint 1.1
    frame #0: 0x000000010000156b foo`foo::main + 107 at foo.rs:3
   1    fn main() {
   2        let a = 9.85;
-> 3        println!("{}", a);
   4    }
(lldb) print a
(double) $0 = 9.8499999999999996
(lldb) 

@fhahn fhahn force-pushed the remove-unused-files-libcoretest branch from 6aa5237 to 268f3c8 Compare October 16, 2015 19:05
@fhahn fhahn force-pushed the remove-unused-files-libcoretest branch from 268f3c8 to 510360d Compare October 16, 2015 19:21
@fhahn
Copy link
Contributor Author

fhahn commented Oct 16, 2015

Ah I see. I have updated the test.

@alexcrichton
Copy link
Member

@bors: r+ 510360d

@bors
Copy link
Collaborator

bors commented Oct 17, 2015

⌛ Testing commit 510360d with merge 4ed46e7...

bors added a commit that referenced this pull request Oct 17, 2015
…richton

While working on #28711 I found out that 

*  src/libcoretest/clone.rs 
* src/libcoretest/fmt/float.rs  
* src/libcoretest/intrinsics.rs 

are not used. I am not sure if removing them is the right way to go. If it makes sense to keep (and fix and enable) them, I would be happy to update the PR.
@bors bors merged commit 510360d into rust-lang:master Oct 17, 2015
@fhahn fhahn deleted the remove-unused-files-libcoretest branch October 17, 2015 08:26
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.

5 participants