Skip to content
CodeWiki
Practice
Paths
Tracks
Cheatsheets
Playground
Glossary
AI era
Search
⌘K
English
English
Chinese
Practice
Paths
Tracks
Cheatsheets
Playground
Glossary
AI era
English
English
Chinese
Practice
/
Quiz
/
Rust
/
Closures
Which statement about move || println!("{label}") is correct when label is a String?
from Closures
Rust 1.98
intermediate
1 min
Which statement about move || println!("{label}") is correct when label is a String?
It captures label by value but can still implement Fn because the body only reads it.
Every move closure implements only FnOnce.
It copies the String bytes into a second allocation on every call.
It borrows label and therefore cannot leave the defining block.
Check
Ask AI about this kata
Report an error
previous kata
A function chooses at runtime between two capturing closure expressions and returns the c…
Quiz
next kata
What does this program print?
Predict the output
A new version is available
Reload