pikelet-lang / pikelet

A friendly little systems language with first-class types. Very WIP! 🚧 🚧 🚧
https://pikelet-lang.github.io/pikelet/
Apache License 2.0
610 stars 26 forks source link

Cannot build with modern versions of Rust #259

Open rzuckerm opened 10 months ago

rzuckerm commented 10 months ago

I'm using cargo build to build this project with Rust 1.74.0 on Alpine 3.18, and I'm seeing this error:

error[E0501]: cannot borrow `*self` as mutable because previous closure requires unique access
   --> pikelet/src/pass/core_to_surface.rs:137:27
    |
136 |     #[debug_ensures(self.names.len() == old(self.names.len()))]
    |     -----------------------------------------------------------
    |     |
    |     closure construction occurs here
    |     first borrow later used by call
137 |     pub fn from_term(&mut self, term: &Term) -> surface::Term {
    |                           ^^^^ second borrow occurs here
...
189 |                 let mut input_terms = vec![self.from_term(input_term)];
    |                                            ---- first borrow occurs due to use of `self` in closure

For more information about this error, try `rustc --explain E0501`.
error: could not compile `pikelet` (lib) due to previous error
warning: build failed, waiting for other jobs to finish...