Skip to content

Cannot build with modern versions of Rust #259

@rzuckerm

Description

@rzuckerm

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...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions