On Wed, 2013-09-25 at 14:29 -0400, Benjamin Striegel wrote:
> Is there a use case that necessitates such a feature? The following
> code works today:
> 
> 
>     let a = 1;
> 
>     let b = 2;
> 
>     let (a, b) = (b, a);
> 
> 
> Not sure why that wouldn't be sufficient.

Motivating toy example then ;)

    fn fib() {
        let mut a = 0;
        let mut b = 1;
    
        loop {
            printfln!(a);
            (a, b) = (b, a + b);
        }
    }


(I miss `let mut (a, b) = ...`!)

-benh


_______________________________________________
Rust-dev mailing list
Rust-dev@mozilla.org
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to