Emurgo / cardano-serialization-lib

This is a library, written in Rust, for serialization & deserialization of data structures used in Cardano's Haskell implementation of Alonzo along with useful utility functions.
Other
231 stars 125 forks source link

Error prevents compiling latest source 12.0.0-beta.3 #680

Closed MarcelKlammer closed 4 weeks ago

MarcelKlammer commented 1 month ago

This commit introduced a compile error: https://github.com/Emurgo/cardano-serialization-lib/commit/500f14422452e17c123e9f5b4d1e700633bab864

error[E0401]: can't use `Self` from outer item
  --> src/protocol_types/certificates/certificate.rs:86:75
   |
75 | impl Certificate {
   | ---- `Self` type implicitly declared here, by this `impl`
...
86 |     pub fn new_reg_cert(stake_registration: &StakeRegistration) -> Result<Self, JsError> {
   |                                                                           ^^^^
   |                                                                           |
   |                                                                           use of `Self` from outer item
   |                                                                           refer to the type directly here instead
   |
   = note: a `const` is a separate item from the item that contains it

error[E0401]: can't use `Self` from outer item
   --> src/protocol_types/certificates/certificate.rs:105:81
    |
75  | impl Certificate {
    | ---- `Self` type implicitly declared here, by this `impl`
...
105 |     pub fn new_unreg_cert(stake_deregistration: &StakeDeregistration) -> Result<Self, JsError> {
    |                                                                                 ^^^^
    |                                                                                 |
    |                                                                                 use of `Self` from outer item
    |                                                                                 refer to the type directly here instead
    |
    = note: a `const` is a separate item from the item that contains it
lisicky commented 1 month ago

Hi @MarcelKlammer! Which rust version do you use ?

MarcelKlammer commented 1 month ago

rustup --version rustup 1.27.1 (2024-04-24) info: This is the version for the rustup toolchain manager, not the rustc compiler. info: The currently active rustc version is rustc 1.80.0 (051478957 2024-07-21)

wasm-pack --version wasm-pack 0.13.0

lisicky commented 1 month ago

@MarcelKlammer I'll check it on 1.80

lisicky commented 1 month ago

Hi @MarcelKlammer ! Could you check the latest CSL 12 beta ?

MarcelKlammer commented 4 weeks ago

Fixed. Thanks.