{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/rfcs/issues/841","labels_url":"https://api.github.com/repos/rust-lang/rfcs/issues/841/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rfcs/issues/841/comments","events_url":"https://api.github.com/repos/rust-lang/rfcs/issues/841/events","html_url":"https://github.com/rust-lang/rfcs/pull/841","id":57684316,"number":841,"title":"Changing Struct Literals","user":{"login":"iopq","id":1817528,"avatar_url":"https://avatars.githubusercontent.com/u/1817528?v=3","gravatar_id":"","url":"https://api.github.com/users/iopq","html_url":"https://github.com/iopq","followers_url":"https://api.github.com/users/iopq/followers","following_url":"https://api.github.com/users/iopq/following{/other_user}","gists_url":"https://api.github.com/users/iopq/gists{/gist_id}","starred_url":"https://api.github.com/users/iopq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iopq/subscriptions","organizations_url":"https://api.github.com/users/iopq/orgs","repos_url":"https://api.github.com/users/iopq/repos","events_url":"https://api.github.com/users/iopq/events{/privacy}","received_events_url":"https://api.github.com/users/iopq/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":24,"created_at":"2015-02-14T06:54:00Z","updated_at":"2015-02-14T11:29:05Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/rust-lang/rfcs/pulls/841","html_url":"https://github.com/rust-lang/rfcs/pull/841","diff_url":"https://github.com/rust-lang/rfcs/pull/841.diff","patch_url":"https://github.com/rust-lang/rfcs/pull/841.patch"},"body":"While this affects the type ascription RFC, it is a good thing to do even if type ascription is not implemented until later. Other considerations are raised like record types and keyword argument syntax.\r\n\r\n[(rendered)](https://github.com/iopq/rfcs/blob/struct-literals/active/0000-struct-literals.md)"},"comment":{"url":"https://api.github.com/repos/rust-lang/rfcs/issues/comments/74371548","html_url":"https://github.com/rust-lang/rfcs/pull/841#issuecomment-74371548","issue_url":"https://api.github.com/repos/rust-lang/rfcs/issues/841","id":74371548,"user":{"login":"jakerr","id":322861,"avatar_url":"https://avatars.githubusercontent.com/u/322861?v=3","gravatar_id":"","url":"https://api.github.com/users/jakerr","html_url":"https://github.com/jakerr","followers_url":"https://api.github.com/users/jakerr/followers","following_url":"https://api.github.com/users/jakerr/following{/other_user}","gists_url":"https://api.github.com/users/jakerr/gists{/gist_id}","starred_url":"https://api.github.com/users/jakerr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jakerr/subscriptions","organizations_url":"https://api.github.com/users/jakerr/orgs","repos_url":"https://api.github.com/users/jakerr/repos","events_url":"https://api.github.com/users/jakerr/events{/privacy}","received_events_url":"https://api.github.com/users/jakerr/received_events","type":"User","site_admin":false},"created_at":"2015-02-14T11:29:05Z","updated_at":"2015-02-14T11:29:05Z","body":"I'm also -1 on changing the syntax. I think it's good now and type ascription is not needed so often that it should govern a change to struct-literal syntax.\r\n\r\nPlease correct me if I'm wrong but I believe the naive syntax for type ascribed struct literals is at least non-ambiguous and useable:\r\n\r\n```rust\r\nFoo { x: a: Bar, y: c: Baz }\r\n``` \r\n\r\nWhether it is pretty is certainly up for debate... though I think the time for that is long past.\r\n\r\nOn the bright side we can make this prettier with tools like syntax-highlighting and conventions. For example removing the spaces around the ascribing `:` make the above nicer looking in my opinion.\r\n\r\n```rust\r\nFoo { x: a:Bar, y: c:Baz }\r\n```\r\n\r\nOr if you really feel like it's too confusing put some parenthesis around the ascribed expression:\r\n\r\n```rust\r\nFoo { x: (a: Bar), y: (c: Baz) }\r\n```\r\n\r\n"}}