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
Using @int instead of @mut int in a type causes a compile error, but using &int instead of &mut int does not.
let o = @mut 5;
let mut m : @int = o; // error: mismatched types: expected `@int` but found `@mut <VI5>` (values differ in mutability)
let mut b : &int = o; // compiles (with type '&int' or '&mut int')?
let mut c : ∫ // to contrast...
c = o; // error: mismatched types: expected `&int` but found `@mut int` (expected &-ptr but found @-ptr)
This could be intended behaviour, but I presume not since as I understand it variable typing is either automatic (from the rvalue) or explicit, not some mixture of the two.