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

Rust compile error's #1

Closed
TheHunterDog opened this issue Mar 26, 2021 · 2 comments
Closed

Rust compile error's #1

TheHunterDog opened this issue Mar 26, 2021 · 2 comments

Comments

@TheHunterDog
Copy link

TheHunterDog commented Mar 26, 2021

error[E0658]: use of unstable library feature 'clamp'
   --> src/main.rs:219:52
    |
219 |                     let col = col.map(|x| x.sqrt().clamp(0.0, 0.999) * 256.);
    |                                                    ^^^^^
    |
    = note: see issue #44095 <https://github.com/rust-lang/rust/issues/44095> for more information

error[E0658]: use of unstable library feature 'clamp'
  --> src/math/texture.rs:80:23
   |
80 |             let u = u.clamp(0., 1.);
   |                       ^^^^^
   |
   = note: see issue #44095 <https://github.com/rust-lang/rust/issues/44095> for more information

error[E0658]: use of unstable library feature 'clamp'
  --> src/math/texture.rs:81:28
   |
81 |             let v = 1. - v.clamp(0., 1.);
   |                            ^^^^^
   |
   = note: see issue #44095 <https://github.com/rust-lang/rust/issues/44095> for more information

error: aborting due to 3 previous errors

For more information about this error, try `rustc --explain E0658`.
error: could not compile `rtiow`

I am using macOS

@luliic2
Copy link
Owner

luliic2 commented Mar 26, 2021

You are probably running an old version of rust. If you follow the link to the issue, it says it is already stabilized.
If you run rustup update first it should work

@TheHunterDog
Copy link
Author

Thank you it works now. Rookie mistake

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