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[E0412]: cannot find type Link in this scope #17

Open
Konard opened this issue Jun 9, 2024 · 0 comments
Open

error[E0412]: cannot find type Link in this scope #17

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_2830

gitpod /workspace/Solver (main) $ rustup toolchain install nightly-2022-08-22 && cargo +nightly-2022-08-22 build
info: syncing channel updates for 'nightly-2022-08-22-x86_64-unknown-linux-gnu'

  nightly-2022-08-22-x86_64-unknown-linux-gnu unchanged - rustc 1.65.0-nightly (c0941dfb5 2022-08-21)

info: checking for self-update
   Compiling linux-raw-sys v0.4.14
   Compiling bitflags v2.5.0
   Compiling fastrand v2.1.0
   Compiling cfg-if v1.0.0
   Compiling beef v0.5.2
   Compiling funty v2.0.0
   Compiling tap v1.0.1
   Compiling bumpalo v3.14.0
   Compiling leak_slice v0.2.0
   Compiling libc v0.2.155
   Compiling thiserror v1.0.61
   Compiling rustix v0.38.34
   Compiling platform-data v0.1.0-beta.3 (https://github.com/linksplatform/doublets-rs#5522d91c)
   Compiling memmap2 v0.5.10
   Compiling platform-trees v0.1.0-beta.1 (https://github.com/linksplatform/doublets-rs#5522d91c)
   Compiling tempfile v3.10.1
   Compiling platform-mem v0.1.0-pre+beta.2 (https://github.com/linksplatform/doublets-rs#5522d91c)
   Compiling doublets v0.1.0-pre+beta.15 (https://github.com/linksplatform/doublets-rs#5522d91c)
   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/5522d91/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
@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