Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

New posts in borrow-checker

struct with reference to element of a vector in another field

rust borrow-checker

Why can a non-capturing closure be used after transferring ownership?

Cannot borrow as mutable more than once at a time

rust borrow-checker

to_string() causes error "borrowed value does not live long enough"

Returning a struct created by serde_json in a function

rust borrow-checker

Why does this mutual referencing structures work in Rust with specified lifetimes?

Modify value in HashMap while immutably borrowing the whole HashMap

rust borrow-checker

How to return a reference into a Rc<RefCell<>> function argument? [duplicate]

rust borrow-checker

Using slice patterns with a slice of Strings

Cannot assign to `self.x` because it is borrowed

cannot borrow as mutable because it is already borrowed, when implementing graph

rust borrow-checker

How to solve [E0382]: use of moved value in a for loop?

Am I incorrectly implementing IntoIterator for a reference or is this a Rust bug that should be reported?

Borrowed value does not live long enough when creating a Vec

immutable value is still being moved

Am I incorrectly implementing IntoIterator for a reference to a LazyList implementation or is this a Rust bug?

How to iterate over mutable elements inside another mutable iteration over the same elements?

rust borrow-checker

Why is Rust NLL not working for multiple borrows in the same statement?

rust borrow-checker

Why does returning early not finish outstanding borrows?

return rust borrow-checker

If the return value of a function has the same lifetime as one of the arguments, then the return value is considered a borrow of the argument?