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

Unable to compile #7

Open
1 task done
Konard opened this issue Sep 20, 2023 · 1 comment · May be fixed by #9
Open
1 task done

Unable to compile #7

Konard opened this issue Sep 20, 2023 · 1 comment · May be fixed by #9
Labels
bug Something isn't working sweep Activate Sweep AI on issue

Comments

@Konard
Copy link
Member

Konard commented Sep 20, 2023

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
@Konard Konard added bug Something isn't working sweep Activate Sweep AI on issue labels Sep 20, 2023
@linksplatform-sweepai
Copy link
Contributor

linksplatform-sweepai bot commented Sep 20, 2023

Here's the PR! #9.

💎 Sweep Pro: I'm creating this ticket using GPT-4. You have unlimited GPT-4 tickets.

Actions (click)

  • ↻ Restart Sweep

Step 1: 🔎 Searching

I found the following snippets in your repository. I will now analyze these snippets and come up with a plan.

Some code snippets I looked at (click to expand). If some file is missing from here, you can mention the path in the ticket description.

Step 2: ⌨️ Coding

• At the top of the file, add the line `use doublets::Link;` to import the `Link` struct. • Change the function signature of `get_link_by_id` from `fn get_link_by_id(store: &mut unit::Store, id: usize) -> Result, Error>` to `fn get_link_by_id(store: &mut unit::Store, id: usize) -> Result, Error>`.

Step 3: 🔁 Code Review

I have finished reviewing the code for completeness. I did not find errors for sweep/fix-compilation-errors.

.


🎉 Latest improvements to Sweep:


💡 To recreate the pull request edit the issue title or description. To tweak the pull request, leave a comment on the pull request.
Join Our Discord

@Konard Konard changed the title Unable to comple Unable to compile Sep 20, 2023
@linksplatform-sweepai linksplatform-sweepai bot linked a pull request Sep 29, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working sweep Activate Sweep AI on issue
Projects
None yet
1 participant