Skip to content
This repository has been archived by the owner on Apr 13, 2022. It is now read-only.

Compilation failing on Rust 1.53.0+ #12

Open
netthier opened this issue Oct 19, 2021 · 0 comments
Open

Compilation failing on Rust 1.53.0+ #12

netthier opened this issue Oct 19, 2021 · 0 comments

Comments

@netthier
Copy link

netthier commented Oct 19, 2021

Due to Rust 1.53.0+ providing its own implementation of Option::insert, building lunarity-lexer fails due to its dependency on logos-derive 0.7.7, which has its own, conflicting implementation of the method.

error[E0061]: this function takes 1 argument but 2 arguments were supplied
   --> /home/lmt/.cargo/registry/src/github.com-1ecc6299db9ec823/logos-derive-0.7.7/src/lib.rs:55:20
    |
55  |             extras.insert(util::ident(&ext), |_| panic!("Only one #[extras] attribute can be declared."));
    |                    ^^^^^^ -----------------  ----------------------------------------------------------- supplied 2 arguments
    |                    |
    |                    expected 1 argument
    |
note: associated function defined here
   --> /usr/home/lmt/.rustup/toolchains/stable-x86_64-unknown-freebsd/lib/rustlib/src/rust/library/core/src/option.rs:850:12
    |
850 |     pub fn insert(&mut self, value: T) -> &mut T {
    |            ^^^^^^

error[E0061]: this function takes 1 argument but 2 arguments were supplied
   --> /home/lmt/.cargo/registry/src/github.com-1ecc6299db9ec823/logos-derive-0.7.7/src/lib.rs:89:23
    |
89  |                 error.insert(variant, |_| panic!("Only one #[error] variant can be declared."));
    |                       ^^^^^^ -------  -------------------------------------------------------- supplied 2 arguments
    |                       |
    |                       expected 1 argument
    |
note: associated function defined here
   --> /usr/home/lmt/.rustup/toolchains/stable-x86_64-unknown-freebsd/lib/rustlib/src/rust/library/core/src/option.rs:850:12
    |
850 |     pub fn insert(&mut self, value: T) -> &mut T {
    |            ^^^^^^

error[E0061]: this function takes 1 argument but 2 arguments were supplied
   --> /home/lmt/.cargo/registry/src/github.com-1ecc6299db9ec823/logos-derive-0.7.7/src/lib.rs:93:21
    |
93  |                 end.insert(variant, |_| panic!("Only one #[end] variant can be declared."));
    |                     ^^^^^^ -------  ------------------------------------------------------ supplied 2 arguments
    |                     |
    |                     expected 1 argument
    |
note: associated function defined here
   --> /usr/home/lmt/.rustup/toolchains/stable-x86_64-unknown-freebsd/lib/rustlib/src/rust/library/core/src/option.rs:850:12
    |
850 |     pub fn insert(&mut self, value: T) -> &mut T {
    |            ^^^^^^

error: aborting due to 3 previous errors

Updating logos to a more recent version should fix this.

@netthier netthier changed the title Compilation failing on 1.53.0+ Compilation failing on Rust 1.53.0+ Oct 19, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant