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
structA{a: ~int,b:bool,}fnmain(){let a = A{a: ~2,b:true};letA{ a, a, _ } = a;println!("{:?}", a);}
I'm not entirely sure why it segfaults, but I shouldn't be able to bind the name a twice. Turns out if you have long variable names and you accidentally forget the colon (to make it a: a, then this is will come back to bite you!)
The text was updated successfully, but these errors were encountered:
This code will segfault when run:
I'm not entirely sure why it segfaults, but I shouldn't be able to bind the name
a
twice. Turns out if you have long variable names and you accidentally forget the colon (to make ita: a
, then this is will come back to bite you!)The text was updated successfully, but these errors were encountered: