Git Product home page Git Product logo

const_ops's Introduction

A const-ready version of core::ops / std::ops arithmetic traits

Requires: Rust nightly

All traits are the same as in std / core but prefixed with the #[const_trait] attribute to allow usage in const situations.

This crate is designed in such a way that, as soon as the #[const_trait] attribute is used in core / std all imports of this crate can simply be deleted.

const_ops's People

Contributors

haennes avatar elpiel avatar

Watchers

 avatar

Forkers

lechevspace

const_ops's Issues

cannot call non-const fn `<Self as PartialEq<Rhs>>::eq` in constant functions

I'm trying to compile const_units using nightly but I keep getting this error:

error[E0015]: cannot call non-const fn <Self as PartialEq<Rhs>>::eq in constant functions
--> /home/elpiel/.cargo/registry/src/index.crates.io-6f17d22bba15001f/const_ops-0.2.2/src/lib.rs:117:15
|
117 | !self.eq(other)
| ^^^^^^^^^
|
= note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
= help: add #![feature(effects)] to the crate attributes to enable

For more information about this error, try rustc --explain E0015.
error: could not compile const_ops (lib) due to 1 previous error

I tried adding #![feature(effects)] to const_units but didn't work. Maybe it should be added to this crate instead?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.