-
Notifications
You must be signed in to change notification settings - Fork 382
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Document that @
pattern can now introduce new bindings
#148
Comments
Jesus that's hideous ... |
How is that even supposed to work, if I do let mut a @ mut b @ c = 1;
b = 2;
dbg!(a); It prints ... I mean, ok, in line with the above this here doesn't compile: struct S(u8);
let a @ b @ c = S(123); So in a sense this doesn't really bind the underlying thing trice, but just creates 3 copies. This is probably the ugliest language concept I've come across but I like your example for outlining this weird behavior. I'd love if someone could sleuth a good (authoritative) link we can add for further reading. |
Since Rust 1.56.0 you can run this code:
PR
playground
The text was updated successfully, but these errors were encountered: