Skip to content
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

statrs 0.6.0 and 0.7.0 beta regression #43680

Closed
est31 opened this Issue Aug 5, 2017 · 7 comments

Comments

Projects
None yet
4 participants
@est31
Copy link
Contributor

est31 commented Aug 5, 2017

statrs versions 0.6.0 and 0.7.0 regressed from stable to beta (full log 1, full log 2):

Aug 03 23:18:26.668 INFO blam! error[E0061]: this function takes 1 parameter but 0 parameters were supplied
Aug 03 23:18:26.668 INFO blam!  --> <anon>:7:11
Aug 03 23:18:26.668 INFO blam!   |
Aug 03 23:18:26.668 INFO blam! 7 | assert!(x.max().is_nan());
Aug 03 23:18:26.668 INFO blam!   |           ^^^ expected 1 parameter
Aug 03 23:18:26.668 INFO blam! 
Aug 03 23:18:26.668 INFO blam! error[E0599]: no method named `is_nan` found for type `[_; 0]` in the current scope
Aug 03 23:18:26.668 INFO blam!  --> <anon>:7:17
Aug 03 23:18:26.668 INFO blam!   |
Aug 03 23:18:26.668 INFO blam! 7 | assert!(x.max().is_nan());
Aug 03 23:18:26.668 INFO blam!   |                 ^^^^^^
Aug 03 23:18:26.668 INFO blam! 

cc @boxtown

@arielb1

This comment has been minimized.

Copy link
Contributor

arielb1 commented Aug 5, 2017

  • #42496 - The functions Ord::min and Ord::max were added.

This conflicts with functions with the same name being implemented by other traits, e.g. by trait Statistics defined in https://github.com/boxtown/statrs/blob/v0.7.0/src/statistics/statistics.rs

To fix this, either rename the conflicting functions, or call them using UFCS notation (Statistics::max(x).is_nan()). This is unfortunate.

@boxtown

This comment has been minimized.

Copy link

boxtown commented Aug 5, 2017

@alexcrichton

This comment has been minimized.

Copy link
Member

alexcrichton commented Aug 5, 2017

@boxtown note that the change here seems to have caused more breakage than intended, so if you've got difficulty fixing this please let us know!

@boxtown

This comment has been minimized.

Copy link

boxtown commented Aug 6, 2017

Regression fix is in place in master (see boxtown/statrs@e728aac) and will be released with 0.8.0. It was only a small regression affecting doc tests for empty slices and can be easily resolved by pinning the type of the slice to [f64; 0] e.g. let x: [f64; 0] = [];. No API or code changes were necessary

@alexcrichton

This comment has been minimized.

Copy link
Member

alexcrichton commented Aug 7, 2017

Ok thanks for the info @boxtown!

@boxtown

This comment has been minimized.

Copy link

boxtown commented Aug 7, 2017

0.8.0 was just released yesterday so this issue can probably be closed

@est31

This comment has been minimized.

Copy link
Contributor Author

est31 commented Aug 7, 2017

Thanks!

@est31 est31 closed this Aug 7, 2017

@scottmcm scottmcm referenced this issue Sep 11, 2017

Open

Tracking issue for clamp RFC #44095

2 of 2 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.