latex-lsp / texlab

An implementation of the Language Server Protocol for LaTeX
GNU General Public License v3.0
1.55k stars 53 forks source link

[cargo build error] #520

Closed vijaypanchalr3 closed 2 years ago

vijaypanchalr3 commented 2 years ago
error[E0658]: use of unstable library feature 'or_insert_with_key' --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/cstree-0.6.1/src/green/builder.rs:142:14 142 .or_insert_with_key( head GreenNode::from_head_and_children(head.clone(), children.iter().cloned())) ^^^^^^^^^^^^^^^^^^
= note: see issue #71024 <https://github.com/rust-lang/rust/issues/71024> for more information
error[E0658]: use of unstable library feature 'or_insert_with_key' --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/cstree-0.6.1/src/green/builder.rs:152:14 152 .or_insert_with_key( data GreenToken::new(*data)) ^^^^^^^^^^^^^^^^^^
= note: see issue #71024 <https://github.com/rust-lang/rust/issues/71024> for more information

error: aborting due to 2 previous errors

For more information about this error, try rustc --explain E0658. error: could not compile cstree.

To learn more, run the command again with --verbose. warning: build failed, waiting for other jobs to finish... error: failed to compile texlab v3.3.1 (https://github.com/latex-lsp/texlab.git#e31b9201), intermediate artifacts can be found at /tmp/cargo-install8TwOWK

Caused by: build failed

pfoerster commented 2 years ago

Thanks for the report. I think your compiler version is too old. The function or_insert_with_key has been stable since Rust 1.50.0 (see here and texlab requires 1.51.0+). Please try updating your compiler. Also, be sure to use the --locked flag in conjunction with cargo install if not done already.