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

Implement f{32|64}::clamp #239

Open
iliekturtles opened this issue Feb 11, 2021 · 8 comments
Open

Implement f{32|64}::clamp #239

iliekturtles opened this issue Feb 11, 2021 · 8 comments

Comments

@iliekturtles
Copy link
Owner

Stable in 1.50.0. How should support for the MSRV be done? Delay implementation?

https://blog.rust-lang.org/2021/02/11/Rust-1.50.0.html

@adamreichold
Copy link
Contributor

An alternative would be to detect the rustc version via build.rs and conditionally compile the implementation.

@adamreichold
Copy link
Contributor

(uom already transitively depends on autocfg so this would be one way to do this without adding a new build dependency.)

@iliekturtles
Copy link
Owner Author

autocfg being a transitive dependency is a good point! I've been hesitant to add a build.rs because compile times are bad enough.

I am toying with the idea of putting off any MSRV changes like this and jumping straight to 1.51 and min_const_generics. I haven't really done much work on the conversion yet.

@adamreichold
Copy link
Contributor

I am toying with the idea of putting off any MSRV changes like this and jumping straight to 1.51 and min_const_generics. I haven't really done much work on the conversion yet.

I am not sure that min_const_generics will be a significant change for uom as it does not include computation based on const type parameters which is sort of the point of compile time dimensional analysis, c.f. #134 (comment)

@iliekturtles
Copy link
Owner Author

Looking at the proof of concept again I see that it does require much more than just min_const_generics: #![feature(const_generics, const_evaluatable_checked, doc_cfg)].

@adamreichold
Copy link
Contributor

Exactly, at a minimum it needs the full const_generics feature as it does computation based on const type parameters.

@iliekturtles
Copy link
Owner Author

As mentioned in #376 I'm inclined to raise the MSRV at this point. 1.43.0 is from April 23, 2020. 1.50.0 is from February 11, 2021.

@iliekturtles
Copy link
Owner Author

MSRV bumped to 1.60.0 in #422. I haven't started looking at this issue yet.

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

No branches or pull requests

2 participants