Rantanen / intercom

Object based cross-language FFI for Rust
MIT License
63 stars 7 forks source link

Cannot compile due to many errors in Rust 1.56 #191

Closed Rike-cz closed 2 years ago

Rike-cz commented 2 years ago

I am not sure what's wrong, I tried to add intercom to dependencies and try example with calculator.

   Compiling quote v0.3.15
   Compiling sha1 v0.3.0
   Compiling synom v0.11.3
   Compiling syn v0.11.11
   Compiling intercom-common v0.2.0
   Compiling intercom-attributes v0.2.0
error: found removed `do catch` syntax
   --> C:\Users\XX\.cargo\registry\src\github.com-1ecc6299db9ec823\intercom-attr
ibutes-0.2.0\src\lib.rs:177:9
    |
177 |         do catch {
    |         ^^^^^^^^ help: replace with the new syntax: `try`
    |
    = note: following RFC #2388, the new non-placeholder syntax is `try`

error: found removed `do catch` syntax
   --> C:\Users\XX\.cargo\registry\src\github.com-1ecc6299db9ec823\intercom-attr
ibutes-0.2.0\src\lib.rs:400:9
    |
400 |         do catch {
    |         ^^^^^^^^ help: replace with the new syntax: `try`
    |
    = note: following RFC #2388, the new non-placeholder syntax is `try`

error[E0554]: `#![feature]` may not be used on the stable release channel
 --> C:\Users\XX\.cargo\registry\src\github.com-1ecc6299db9ec823\intercom-attrib
utes-0.2.0\src\lib.rs:1:1
  |
1 | #![feature(proc_macro)]
  | ^^^^^^^^^^^^^^^^^^^^^^^ help: remove the attribute
  |
  = help: the feature `proc_macro` has been stable since 1.29.0 and no longer re
quires an attribute to enable

error[E0554]: `#![feature]` may not be used on the stable release channel
 --> C:\Users\XX\.cargo\registry\src\github.com-1ecc6299db9ec823\intercom-attrib
utes-0.2.0\src\lib.rs:3:1
  |
3 | #![feature(catch_expr)]
  | ^^^^^^^^^^^^^^^^^^^^^^^

error[E0554]: `#![feature]` may not be used on the stable release channel
 --> C:\Users\XX\.cargo\registry\src\github.com-1ecc6299db9ec823\intercom-attrib
utes-0.2.0\src\lib.rs:4:1
  |
4 | #![feature(type_ascription)]
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0658]: `try` expression is experimental
   --> C:\Users\XX\.cargo\registry\src\github.com-1ecc6299db9ec823\intercom-attr
ibutes-0.2.0\src\lib.rs:177:9
    |
177 | /         do catch {
178 | |
179 | |             // Parse the method info.
180 | |             let method_info = ComMethodInfo::new(
...   |
259 | |             Some(())
260 | |         };
    | |_________^
    |
    = note: see issue #31436 <https://github.com/rust-lang/rust/issues/31436> fo
r more information

error[E0658]: `try` expression is experimental
   --> C:\Users\XX\.cargo\registry\src\github.com-1ecc6299db9ec823\intercom-attr
ibutes-0.2.0\src\lib.rs:400:9
    |
400 | /         do catch {
401 | |             let method_impl_ident = idents::method_impl(
402 | |                 &struct_ident,
403 | |                 &itf_ident,
...   |
447 | |             Some(())
448 | |         };
    | |_________^
    |
    = note: see issue #31436 <https://github.com/rust-lang/rust/issues/31436> fo
r more information

error[E0283]: type annotations needed
   --> C:\Users\XX\.cargo\registry\src\github.com-1ecc6299db9ec823\intercom-attr
ibutes-0.2.0\src\lib.rs:181:59
    |
181 |                     &method_ident, &method_sig.decl ).ok()?;
    |                                                           ^ cannot infer t
ype
    |
    = note: cannot satisfy `_: FromResidual<Option<Infallible>>`
note: required by `from_residual`
   --> C:\Users\XX\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib/rustlib/
src/rust\library\core\src\ops\try_trait.rs:339:5
    |
339 |     fn from_residual(residual: R) -> Self;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0283]: type annotations needed
   --> C:\Users\XX\.cargo\registry\src\github.com-1ecc6299db9ec823\intercom-attr
ibutes-0.2.0\src\lib.rs:408:59
    |
408 |                     &method_ident, &method_sig.decl ).ok()?;
    |                                                           ^ cannot infer t
ype
    |
    = note: cannot satisfy `_: FromResidual<Option<Infallible>>`
note: required by `from_residual`
   --> C:\Users\XX\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib/rustlib/
src/rust\library\core\src\ops\try_trait.rs:339:5
    |
339 |     fn from_residual(residual: R) -> Self;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Some errors have detailed explanations: E0283, E0554, E0658.
For more information about an error, try `rustc --explain E0283`.
error: could not compile `intercom-attributes` due to 9 previous errors
Rantanen commented 2 years ago

Ow, that's interesting. Guess the proc macro is emitting non-2021 compatible syntax or something similar. Will look into this on the upcoming week, thanks!

Rantanen commented 2 years ago

Finally done! Sorry took a while; Had my fingers paralyzed for good 5 months, which delayed things by quite a bit!

(I'll push a new version to crates.io once I've done one package update still.)

Rike-cz commented 2 years ago

Great job, thank you very much! I hope your fingers are and will be already in a good shape only!