-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
error[E0594]: cannot assign to captured outer variable in an `Fn` closure
--> main.rs:232:9
|
225 | let mut typing_last = Instant::now();
| --------------- help: consider making `mut typing_last` mutable: `mut mut typing_last`
...
232 | typing_last = Instant::now();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
help: consider changing this closure to take self by mutable reference
--> main.rs:228:40
|
228 | input.connect_property_text_notify(move |input| {
| ________________________________________^
229 | | if typing_last.elapsed() < typing_duration {
230 | | return;
231 | | }
... |
234 | | println!("{:?}", text);
235 | | });
| |_____^
help: consider making
mut typing_last
mutable:mut mut typing_last
Sadly I can't seems to find a minimal reproduction example where this appears, but I commited all my code to a separate branch so you can look at the code (or try to compile it yourself): rust-weird-error.
I'm sorry, but that's all I have on this error.
LunaBorowskakennytm, scottmcm and LunaBorowska
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.