Skip to content

Unable to compile #7

Open
Open
@Konard

Description

@Konard
gitpod /workspace/Solver (main) $ cargo run
   Compiling solver v0.1.0 (/workspace/Solver)
error[E0412]: cannot find type `Link` in this scope
  --> src/main.rs:70:75
   |
70 | fn get_link_by_id(store: &mut unit::Store<usize, _>, id: usize) -> Result<Link<usize>, Error<usize>> {
   |                                                                           ^^^^
   |
  ::: /workspace/.cargo/git/checkouts/doublets-rs-3835f06948971044/a35ee5b/doublets/src/data/traits.rs:16:1
   |
16 | pub trait Links<T: LinkType>: Send + Sync {
   | ----------------------------------------- similarly named trait `Links` defined here
   |
help: a trait with a similar name exists
   |
70 | fn get_link_by_id(store: &mut unit::Store<usize, _>, id: usize) -> Result<Links<usize>, Error<usize>> {
   |                                                                           ~~~~~
help: consider importing this struct
   |
1  | use doublets::Link;
   |

error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
  --> src/main.rs:70:50
   |
70 | fn get_link_by_id(store: &mut unit::Store<usize, _>, id: usize) -> Result<Link<usize>, Error<usize>> {
   |                                                  ^ not allowed in type signatures
   |
help: use type parameters instead
   |
70 | fn get_link_by_id<T>(store: &mut unit::Store<usize, T>, id: usize) -> Result<Link<usize>, Error<usize>> {
   |                  +++                                ~

Some errors have detailed explanations: E0121, E0412.
For more information about an error, try `rustc --explain E0121`.
error: could not compile `solver` due to 2 previous errors
Checklist

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingsweepActivate Sweep AI on issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions