1
Fork 0

Fix E0741 error code explanation

Use OK ! like other explanations
This commit is contained in:
Ruben Gonzalez 2020-08-12 23:42:10 +02:00 committed by GitHub
parent ef1d58e7c9
commit b38e571e9c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -37,8 +37,7 @@ fn i_want_static_closure<F>(a: F)
fn print_string(s: Mutex<MyString<'static>>) {
i_want_static_closure(move || { // error: this closure has lifetime 'a
// rather than 'static
i_want_static_closure(move || { // ok!
println!("{}", s.lock().unwrap().data);
});
}