python (65.2k questions)
javascript (44.3k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (13k questions)
How to solve "Returns a value referencing data owned by the current function" (Actual depenecies between structs)
I'm learning Rust (I'm a C++ dev) and I'm still getting used to the borrow checker.
I have the following example (which is also on godbolt: https://godbolt.org/z/z873x9cPn):
struct Foo {
value: i3...
Pau6b
Votes: 0
Answers: 1
Why does this Ownership transfer does not cause an error?
I'm working through the ownership section.
I wrote the following code an expected an error.
Question: Why isn't there an error in the first compiling version?
This one compiles:
fn main () {
let mut ...
Inux
Votes: 0
Answers: 2
Rust type that requires manual drop
Is there a way to have the Rust compiler error if a struct is to be automatically dropped?
Example: I'm implementing a memory pool and want the allocations to be manually returned to the memory pool t...
Patrick Lorio
Votes: 0
Answers: 1
Rust - Lifetimes - Understanding Lifetime Error for mutable reference to self
I'm sure this is a duplicate, but I can't find a question which matches my question, exactly since I have a couple extra requirements because I have to adhere to some traits that I can't control.
Here...

Jerfov2
Votes: 0
Answers: 1