alchemy icon indicating copy to clipboard operation
alchemy copied to clipboard

Unable to compile example - cannot infer type, consider giving `result` a type

Open diit opened this issue 4 years ago • 1 comments

Setup

  • Git clone master
  • cargo run

Versions

Default host: x86_64-apple-darwin rustup home: /.../.rustup

installed toolchains

stable-x86_64-apple-darwin 1.35.0-x86_64-apple-darwin 1.39.0-x86_64-apple-darwin

active toolchain

1.35.0-x86_64-apple-darwin (overridden by '/.../alchemy/rust-toolchain') rustc 1.35.0 (3c235d560 2019-05-20)

What are you trying to accomplish?

Running example

What is the actual output?

error[E0282]: type annotations needed
  --> cocoa/src/app.rs:42:13
   |
42 |             msg_send![&*inner, setDelegate:delegate];
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |             |
   |             cannot infer type
   |             consider giving `result` a type
   |
   = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)

warning: unused import: `Component`
  --> cocoa/src/window.rs:16:46
   |
16 | use alchemy_lifecycle::traits::{AppDelegate, Component};
   |                                              ^^^^^^^^^
   |
   = note: #[warn(unused_imports)] on by default

error: aborting due to previous error

For more information about this error, try `rustc --explain E0282`.
error: Could not compile `alchemy-cocoa`.
warning: build failed, waiting for other jobs to finish...
error: build failed

Checklist

  • [x] I have already looked over the issue tracker for similar issues.
  • [x] This issue can be reproduced on Rust's stable channel. (Your issue will be closed if this is not the case)

diit avatar Mar 24 '20 19:03 diit

Heya - thanks for taking interest. I appreciate the Rust community's interest in GUI solutions but... well, I should put a notice in the README. :\

You can see this comment I posted on Reddit when it came up there recently for more context - I'd like to return to this eventually but it's just a bit heavy for me right now. If you're interested in following my work in this area, you can check out appkit-rs, which is a Cocoa/AppKit wrapper that'd end up being used here whenever I can return to it.

ryanmcgrath avatar Mar 24 '20 19:03 ryanmcgrath