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
It's more of a paper cut but I find it tedious to write code in following fashion:
let (foo, bar, almost_all_variables) = {
let foobar = borrow_some_variable;
let foo = borrow_some_variable.foo();
let bar = borrow_some_variable.bar();
...
(foo, bar, almost_all_variables)
};
// Here I cannot have a borrowed variable
let (foobar, ....) = {
I would prefer to have something like:
let foobar = borrow_some_variable;
let foo = borrow_some_variable.foo();
let bar = borrow_some_variable.bar();
...
forger foobar;
// We behave as if we exited scope of foobar and all dependent variables but with autoexport of them
Or at least some syntax sugar over the top:
scoped! {
let foobar = borrow_some_variable;
outer!(let foo = borrow_some_variable.foo()); // Export to outer scop
outer!(let bar = borrow_some_variable.bar());
};
The text was updated successfully, but these errors were encountered:
I'm going to close this as "the basic point of NLL" -- it seems like too general of a bug report to be actionable just now. @uzytkownik, if you like you may experiment with NLL by doing #![feature(nll)], and if you encounter problems, please do file issues! =)
It's more of a paper cut but I find it tedious to write code in following fashion:
I would prefer to have something like:
Or at least some syntax sugar over the top:
The text was updated successfully, but these errors were encountered: