rust-num / num-traits

Numeric traits for generic mathematics in Rust
Apache License 2.0
731 stars 135 forks source link

Update AsPrimitive Safety docs for rust 1.45 #184

Closed martin-t closed 4 years ago

martin-t commented 4 years ago

Fixes #174

The safety section should not be removed entirely since people might be using older compilers (as was pointed out to me in a related issue in the vek crate).

However, this and followup comments indicate that the second case (float to float) was never UB in the first place - should the second example be removed?

cuviper commented 4 years ago

Hi,

However, this and followup comments indicate that the second case (float to float) was never UB in the first place - should the second example be removed?

Yes, I think we can remove that altogether -- would you like to do that here?

martin-t commented 4 years ago

Sure, I also changed the phrasing into past tense in the first example and removed the bullet point since it's no longer a list. Is is ok like this?

cuviper commented 4 years ago

Works for me, thanks!

bors r+

bors[bot] commented 4 years ago

Build succeeded: