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

Error on lua_tuple![].arc() #13

Open
ninomerlino opened this issue Apr 15, 2023 · 1 comment
Open

Error on lua_tuple![].arc() #13

ninomerlino opened this issue Apr 15, 2023 · 1 comment

Comments

@ninomerlino
Copy link

my code:

fn run(&self, code : &mut Peekable<impl Iterator<Item = char>>) -> Result<Arc<vm::value::Table>> {
    let lexer = ast::lexer::Lexer{ source : code.peekable()};
    let parsed = ast::parser::parse_block(
        &mut ast::parser::TokenIterator(lexer.peekable())
    )?;
    let compiled = compiler::compile_block(&parsed);
    let result = self.vm.execute(&compiled.into(), lua_tuple![].arc()).map_err(into_err)?;
    Ok(result)
}

error occurs on lua_tuple![]
error message:

unresolved import hashbrown
use of undeclared crate or module hashbrownrustcClick for full compiler diagnostic
value.rs(124, 8): Actual error occurred here

if i do cargo add hashbrown the error changes to this:

mismatched types
struct hashbrown::HashMap and struct hashbrown::map::HashMap have similar names, but are actually distinct types
perhaps two different versions of crate hashbrown are being used?rustcClick for full compiler diagnostic
value.rs(133, 28): Actual error occurred here
value.rs(133, 17): arguments to this function are incorrect
map.rs(188, 1): struct hashbrown::HashMap is defined in crate hashbrown
map.rs(192, 1): struct hashbrown::map::HashMap is defined in crate hashbrown
mutex.rs(219, 18): associated function defined here

my dependecies are:

[dependencies]
hematita = "0.1.0"
string-error = "0.1.0"
@lenscas
Copy link

lenscas commented Apr 15, 2023

I think you need to add this version of hashbrown

hashbrown = "0.11.2"

Ideally, the macro gets fixed so it doesn't require you to have hashbrown in your dependencies anymore though....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants