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

error[E0658]: impl Trait in associated types is unstable (on latest rust nightly and git dependency) #19

Open
Konard opened this issue Jun 9, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@Konard
Copy link
Member

Konard commented Jun 9, 2024

IMG_2832

gitpod /workspace/Solver (main) $ rustup update nightly
info: syncing channel updates for 'nightly-x86_64-unknown-linux-gnu'

  nightly-x86_64-unknown-linux-gnu unchanged - rustc 1.81.0-nightly (f21554f7f 2024-06-08)

info: checking for self-update
gitpod /workspace/Solver (main) $ cargo add doublets
    Updating git repository `https://github.com/linksplatform/doublets-rs`
      Adding doublets (git) to dependencies.
gitpod /workspace/Solver (main) $ cargo +nightly run
   Compiling delegate v0.7.0
   Compiling platform-data v0.1.0-beta.3 (https://github.com/linksplatform/doublets-rs#5522d91c)
error[E0658]: `impl Trait` in associated types is unstable
  --> /workspace/.cargo/git/checkouts/doublets-rs-3835f06948971044/5522d91/dev-deps/data-rs/src/point.rs:52:21
   |
52 |     type IntoIter = impl Iterator<Item = T>;
   |                     ^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information
   = help: add `#![feature(impl_trait_in_assoc_type)]` to the crate attributes to enable
   = note: this compiler was built on 2024-06-08; consider upgrading it if it is out of date

error[E0635]: unknown feature `const_deref`
 --> /workspace/.cargo/git/checkouts/doublets-rs-3835f06948971044/5522d91/dev-deps/data-rs/src/lib.rs:8:12
  |
8 | #![feature(const_deref)]
  |            ^^^^^^^^^^^

error[E0635]: unknown feature `const_result_drop`
 --> /workspace/.cargo/git/checkouts/doublets-rs-3835f06948971044/5522d91/dev-deps/data-rs/src/lib.rs:5:12
  |
5 | #![feature(const_result_drop)]
  |            ^^^^^^^^^^^^^^^^^

error[E0635]: unknown feature `const_convert`
 --> /workspace/.cargo/git/checkouts/doublets-rs-3835f06948971044/5522d91/dev-deps/data-rs/src/lib.rs:7:12
  |
7 | #![feature(const_convert)]
  |            ^^^^^^^^^^^^^

error: `~const` can only be applied to `#[const_trait]` traits
 --> /workspace/.cargo/git/checkouts/doublets-rs-3835f06948971044/5522d91/dev-deps/data-rs/src/converters.rs:9:47
  |
9 |     pub const fn convert<T: LinkType + ~const Integral + ~const Sub>(&self, source: T) -> T {
  |                                               ^^^^^^^^

error: `~const` can only be applied to `#[const_trait]` traits
 --> /workspace/.cargo/git/checkouts/doublets-rs-3835f06948971044/5522d91/dev-deps/data-rs/src/converters.rs:9:65
  |
9 |     pub const fn convert<T: LinkType + ~const Integral + ~const Sub>(&self, source: T) -> T {
  |                                                                 ^^^

error: `~const` can only be applied to `#[const_trait]` traits
  --> /workspace/.cargo/git/checkouts/doublets-rs-3835f06948971044/5522d91/dev-deps/data-rs/src/converters.rs:18:47
   |
18 |     pub const fn convert<T: LinkType + ~const Integral + ~const Sub>(&self, source: T) -> T {
   |                                               ^^^^^^^^

error: `~const` can only be applied to `#[const_trait]` traits
  --> /workspace/.cargo/git/checkouts/doublets-rs-3835f06948971044/5522d91/dev-deps/data-rs/src/converters.rs:18:65
   |
18 |     pub const fn convert<T: LinkType + ~const Integral + ~const Sub>(&self, source: T) -> T {
   |                                                                 ^^^

error: `~const` can only be applied to `#[const_trait]` traits
  --> /workspace/.cargo/git/checkouts/doublets-rs-3835f06948971044/5522d91/dev-deps/data-rs/src/hybrid.rs:17:19
   |
17 |         T: ~const Div<Output = T>,
   |                   ^^^^^^^^^^^^^^^

error: `~const` can only be applied to `#[const_trait]` traits
  --> /workspace/.cargo/git/checkouts/doublets-rs-3835f06948971044/5522d91/dev-deps/data-rs/src/hybrid.rs:24:19
   |
24 |         T: ~const Integral + ~const Sub,
   |                   ^^^^^^^^

error: `~const` can only be applied to `#[const_trait]` traits
  --> /workspace/.cargo/git/checkouts/doublets-rs-3835f06948971044/5522d91/dev-deps/data-rs/src/hybrid.rs:24:37
   |
24 |         T: ~const Integral + ~const Sub,
   |                                     ^^^

error: `~const` can only be applied to `#[const_trait]` traits
  --> /workspace/.cargo/git/checkouts/doublets-rs-3835f06948971044/5522d91/dev-deps/data-rs/src/hybrid.rs:37:19
   |
37 |         T: ~const Integral + ~const Sub,
   |                   ^^^^^^^^

error: `~const` can only be applied to `#[const_trait]` traits
  --> /workspace/.cargo/git/checkouts/doublets-rs-3835f06948971044/5522d91/dev-deps/data-rs/src/hybrid.rs:37:37
   |
37 |         T: ~const Integral + ~const Sub,
   |                                     ^^^

error: `~const` can only be applied to `#[const_trait]` traits
  --> /workspace/.cargo/git/checkouts/doublets-rs-3835f06948971044/5522d91/dev-deps/data-rs/src/hybrid.rs:44:19
   |
44 |         T: ~const Default + ~const PartialEq,
   |                   ^^^^^^^

error: `~const` can only be applied to `#[const_trait]` traits
  --> /workspace/.cargo/git/checkouts/doublets-rs-3835f06948971044/5522d91/dev-deps/data-rs/src/hybrid.rs:51:19
   |
51 |         T: ~const Div + ~const PartialOrd,
   |                   ^^^

error: `~const` can only be applied to `#[const_trait]` traits
  --> /workspace/.cargo/git/checkouts/doublets-rs-3835f06948971044/5522d91/dev-deps/data-rs/src/hybrid.rs:51:32
   |
51 |         T: ~const Div + ~const PartialOrd,
   |                                ^^^^^^^^^^

error: `~const` can only be applied to `#[const_trait]` traits
  --> /workspace/.cargo/git/checkouts/doublets-rs-3835f06948971044/5522d91/dev-deps/data-rs/src/hybrid.rs:58:19
   |
58 |         T: ~const Div + ~const PartialOrd + ~const PartialEq,
   |                   ^^^

error: `~const` can only be applied to `#[const_trait]` traits
  --> /workspace/.cargo/git/checkouts/doublets-rs-3835f06948971044/5522d91/dev-deps/data-rs/src/hybrid.rs:58:32
   |
58 |         T: ~const Div + ~const PartialOrd + ~const PartialEq,
   |                                ^^^^^^^^^^

error: `~const` can only be applied to `#[const_trait]` traits
  --> /workspace/.cargo/git/checkouts/doublets-rs-3835f06948971044/5522d91/dev-deps/data-rs/src/hybrid.rs:65:19
   |
65 |         T: ~const Integral,
   |                   ^^^^^^^^

error[E0015]: cannot call non-const fn `<T as FuntyPart>::funty` in constant functions
  --> /workspace/.cargo/git/checkouts/doublets-rs-3835f06948971044/5522d91/dev-deps/data-rs/src/hybrid.rs:19:18
   |
19 |         T::MAX / T::funty(2)
   |                  ^^^^^^^^^^^
   |
   = 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
  --> /workspace/.cargo/git/checkouts/doublets-rs-3835f06948971044/5522d91/dev-deps/data-rs/src/lib.rs:11:1
   |
11 + #![feature(effects)]
   |

error[E0015]: cannot call non-const operator in constant functions
  --> /workspace/.cargo/git/checkouts/doublets-rs-3835f06948971044/5522d91/dev-deps/data-rs/src/hybrid.rs:19:9
   |
19 |         T::MAX / T::funty(2)
   |         ^^^^^^^^^^^^^^^^^^^^
   |
   = 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
  --> /workspace/.cargo/git/checkouts/doublets-rs-3835f06948971044/5522d91/dev-deps/data-rs/src/lib.rs:11:1
   |
11 + #![feature(effects)]
   |

error[E0015]: cannot call non-const operator in constant functions
  --> /workspace/.cargo/git/checkouts/doublets-rs-3835f06948971044/5522d91/dev-deps/data-rs/src/hybrid.rs:39:9
   |
39 |         (T::MAX - value).wrapping_add(T::funty(1))
   |         ^^^^^^^^^^^^^^^^
   |
   = 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
  --> /workspace/.cargo/git/checkouts/doublets-rs-3835f06948971044/5522d91/dev-deps/data-rs/src/lib.rs:11:1
   |
11 + #![feature(effects)]
   |

error[E0015]: cannot call non-const fn `<T as FuntyPart>::funty` in constant functions
  --> /workspace/.cargo/git/checkouts/doublets-rs-3835f06948971044/5522d91/dev-deps/data-rs/src/hybrid.rs:39:39
   |
39 |         (T::MAX - value).wrapping_add(T::funty(1))
   |                                       ^^^^^^^^^^^
   |
   = 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
  --> /workspace/.cargo/git/checkouts/doublets-rs-3835f06948971044/5522d91/dev-deps/data-rs/src/lib.rs:11:1
   |
11 + #![feature(effects)]
   |

error[E0015]: cannot call non-const fn `<T as Integral>::wrapping_add` in constant functions
  --> /workspace/.cargo/git/checkouts/doublets-rs-3835f06948971044/5522d91/dev-deps/data-rs/src/hybrid.rs:39:26
   |
39 |         (T::MAX - value).wrapping_add(T::funty(1))
   |                          ^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = 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
  --> /workspace/.cargo/git/checkouts/doublets-rs-3835f06948971044/5522d91/dev-deps/data-rs/src/lib.rs:11:1
   |
11 + #![feature(effects)]
   |

error[E0015]: cannot call non-const fn `<T as FuntyPart>::funty` in constant functions
  --> /workspace/.cargo/git/checkouts/doublets-rs-3835f06948971044/5522d91/dev-deps/data-rs/src/hybrid.rs:46:23
   |
46 |         self.value == T::funty(0)
   |                       ^^^^^^^^^^^
   |
   = 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
  --> /workspace/.cargo/git/checkouts/doublets-rs-3835f06948971044/5522d91/dev-deps/data-rs/src/lib.rs:11:1
   |
11 + #![feature(effects)]
   |

error[E0015]: cannot call non-const operator in constant functions
  --> /workspace/.cargo/git/checkouts/doublets-rs-3835f06948971044/5522d91/dev-deps/data-rs/src/hybrid.rs:46:9
   |
46 |         self.value == T::funty(0)
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = 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
  --> /workspace/.cargo/git/checkouts/doublets-rs-3835f06948971044/5522d91/dev-deps/data-rs/src/lib.rs:11:1
   |
11 + #![feature(effects)]
   |

error[E0015]: cannot call non-const operator in constant functions
  --> /workspace/.cargo/git/checkouts/doublets-rs-3835f06948971044/5522d91/dev-deps/data-rs/src/hybrid.rs:53:9
   |
53 |         self.value < Self::half() // || self.value == T::default()
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = 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
  --> /workspace/.cargo/git/checkouts/doublets-rs-3835f06948971044/5522d91/dev-deps/data-rs/src/lib.rs:11:1
   |
11 + #![feature(effects)]
   |

error[E0015]: cannot call non-const fn `<T as FuntyPart>::funty` in constant functions
  --> /workspace/.cargo/git/checkouts/doublets-rs-3835f06948971044/5522d91/dev-deps/data-rs/src/hybrid.rs:60:46
   |
60 |         !self.is_internal() || self.value == T::funty(0)
   |                                              ^^^^^^^^^^^
   |
   = 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
  --> /workspace/.cargo/git/checkouts/doublets-rs-3835f06948971044/5522d91/dev-deps/data-rs/src/lib.rs:11:1
   |
11 + #![feature(effects)]
   |

error[E0015]: cannot call non-const operator in constant functions
  --> /workspace/.cargo/git/checkouts/doublets-rs-3835f06948971044/5522d91/dev-deps/data-rs/src/hybrid.rs:60:32
   |
60 |         !self.is_internal() || self.value == T::funty(0)
   |                                ^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = 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
  --> /workspace/.cargo/git/checkouts/doublets-rs-3835f06948971044/5522d91/dev-deps/data-rs/src/lib.rs:11:1
   |
11 + #![feature(effects)]
   |

error[E0015]: cannot call non-const fn `<T as FuntyPart>::funty` in constant functions
  --> /workspace/.cargo/git/checkouts/doublets-rs-3835f06948971044/5522d91/dev-deps/data-rs/src/hybrid.rs:67:33
   |
67 |         self.value.wrapping_add(T::funty(1)).wrapping_add(T::MAX)
   |                                 ^^^^^^^^^^^
   |
   = 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
  --> /workspace/.cargo/git/checkouts/doublets-rs-3835f06948971044/5522d91/dev-deps/data-rs/src/lib.rs:11:1
   |
11 + #![feature(effects)]
   |

error[E0015]: cannot call non-const fn `<T as Integral>::wrapping_add` in constant functions
  --> /workspace/.cargo/git/checkouts/doublets-rs-3835f06948971044/5522d91/dev-deps/data-rs/src/hybrid.rs:67:20
   |
67 |         self.value.wrapping_add(T::funty(1)).wrapping_add(T::MAX)
   |                    ^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = 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
  --> /workspace/.cargo/git/checkouts/doublets-rs-3835f06948971044/5522d91/dev-deps/data-rs/src/lib.rs:11:1
   |
11 + #![feature(effects)]
   |

error[E0015]: cannot call non-const fn `<T as Integral>::wrapping_add` in constant functions
  --> /workspace/.cargo/git/checkouts/doublets-rs-3835f06948971044/5522d91/dev-deps/data-rs/src/hybrid.rs:67:46
   |
67 |         self.value.wrapping_add(T::funty(1)).wrapping_add(T::MAX)
   |                                              ^^^^^^^^^^^^^^^^^^^^
   |
   = 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
  --> /workspace/.cargo/git/checkouts/doublets-rs-3835f06948971044/5522d91/dev-deps/data-rs/src/lib.rs:11:1
   |
11 + #![feature(effects)]
   |

Some errors have detailed explanations: E0015, E0635, E0658.
For more information about an error, try `rustc --explain E0015`.
error: could not compile `platform-data` (lib) due to 32 previous errors
warning: build failed, waiting for other jobs to finish...
gitpod /workspace/Solver (main) $ 
@Konard Konard added the bug Something isn't working label Jun 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant