Gammer fix
This commit is contained in:
parent
751fe7c43d
commit
b4e1fbcf81
1 changed files with 3 additions and 3 deletions
|
|
@ -21,9 +21,9 @@ fn print_string<'a>(s: Mutex<MyString<'a>>) {
|
|||
}
|
||||
```
|
||||
|
||||
In this example, the closure doesn't satisfy the `'static` lifetime constraint.
|
||||
To fix this kind of error, you need to double check lifetime of the type. Here,
|
||||
we can fix this problem by giving `s` a static lifetime:
|
||||
In this example, the closure does not satisfy the `'static` lifetime constraint.
|
||||
To fix this error, you need to double check the lifetime of the type. Here, we
|
||||
can fix this problem by giving `s` a static lifetime:
|
||||
|
||||
```
|
||||
use std::sync::Mutex;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue