mirror of
https://github.com/rust-lang/book.git
synced 2026-12-01 15:06:07 -06:00
Add another question we need to answer
This commit is contained in:
@@ -240,7 +240,8 @@ note: borrowed value must be valid for the lifetime 'a as defined on the block a
|
||||
```
|
||||
|
||||
Now we have our "does not live long enough" error. What gives? Why does Rust
|
||||
need this parameter in the first place?
|
||||
need this parameter in the first place? And why didn't adding this parameter
|
||||
fix the error?
|
||||
|
||||
When we have code inside of a function, Rust can analyze that specific case.
|
||||
There's only one thing to look at. But functions get called multiple times. So
|
||||
|
||||
Reference in New Issue
Block a user