You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I may be missing something, but the text says that this snippet from the closures section "Can't be done", but it seems to compile without any trouble (using rustc 1.38.0). Thanks for your work on this guide!
.
fnmain(){letmut s = "world";// closure does a mutable borrow of sletmut changer = || s = "world";changer();// does an immutable borrow of sassert_eq!(s,"world");}
The text was updated successfully, but these errors were encountered:
I may be missing something, but the text says that this snippet from the closures section "Can't be done", but it seems to compile without any trouble (using rustc 1.38.0). Thanks for your work on this guide!
.
The text was updated successfully, but these errors were encountered: