{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/rust/issues/36520","repository_url":"https://api.github.com/repos/rust-lang/rust","labels_url":"https://api.github.com/repos/rust-lang/rust/issues/36520/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rust/issues/36520/comments","events_url":"https://api.github.com/repos/rust-lang/rust/issues/36520/events","html_url":"https://github.com/rust-lang/rust/pull/36520","id":177329760,"number":36520,"title":"Reword error when data-less enum variant called as function","user":{"login":"estebank","id":1606434,"avatar_url":"https://avatars.githubusercontent.com/u/1606434?v=3","gravatar_id":"","url":"https://api.github.com/users/estebank","html_url":"https://github.com/estebank","followers_url":"https://api.github.com/users/estebank/followers","following_url":"https://api.github.com/users/estebank/following{/other_user}","gists_url":"https://api.github.com/users/estebank/gists{/gist_id}","starred_url":"https://api.github.com/users/estebank/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/estebank/subscriptions","organizations_url":"https://api.github.com/users/estebank/orgs","repos_url":"https://api.github.com/users/estebank/repos","events_url":"https://api.github.com/users/estebank/events{/privacy}","received_events_url":"https://api.github.com/users/estebank/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"pnkfelix","id":173127,"avatar_url":"https://avatars.githubusercontent.com/u/173127?v=3","gravatar_id":"","url":"https://api.github.com/users/pnkfelix","html_url":"https://github.com/pnkfelix","followers_url":"https://api.github.com/users/pnkfelix/followers","following_url":"https://api.github.com/users/pnkfelix/following{/other_user}","gists_url":"https://api.github.com/users/pnkfelix/gists{/gist_id}","starred_url":"https://api.github.com/users/pnkfelix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pnkfelix/subscriptions","organizations_url":"https://api.github.com/users/pnkfelix/orgs","repos_url":"https://api.github.com/users/pnkfelix/repos","events_url":"https://api.github.com/users/pnkfelix/events{/privacy}","received_events_url":"https://api.github.com/users/pnkfelix/received_events","type":"User","site_admin":false},"assignees":[{"login":"pnkfelix","id":173127,"avatar_url":"https://avatars.githubusercontent.com/u/173127?v=3","gravatar_id":"","url":"https://api.github.com/users/pnkfelix","html_url":"https://github.com/pnkfelix","followers_url":"https://api.github.com/users/pnkfelix/followers","following_url":"https://api.github.com/users/pnkfelix/following{/other_user}","gists_url":"https://api.github.com/users/pnkfelix/gists{/gist_id}","starred_url":"https://api.github.com/users/pnkfelix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pnkfelix/subscriptions","organizations_url":"https://api.github.com/users/pnkfelix/orgs","repos_url":"https://api.github.com/users/pnkfelix/repos","events_url":"https://api.github.com/users/pnkfelix/events{/privacy}","received_events_url":"https://api.github.com/users/pnkfelix/received_events","type":"User","site_admin":false}],"milestone":null,"comments":10,"created_at":"2016-09-16T01:49:07Z","updated_at":"2016-09-16T22:05:35Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/rust-lang/rust/pulls/36520","html_url":"https://github.com/rust-lang/rust/pull/36520","diff_url":"https://github.com/rust-lang/rust/pull/36520.diff","patch_url":"https://github.com/rust-lang/rust/pull/36520.patch"},"body":"Given a file like:\r\n\r\n```rust\r\nenum Test {\r\n    Variant,\r\n    Variant2 {a: u32},\r\n}\r\n\r\nfn main(){\r\n    let x = Test::Variant(\"Hello\");\r\n    let y = Test::Variant2(\"World\");\r\n}\r\n```\r\n\r\nBoth errors now look similar:\r\n\r\n```bash\r\nerror[E0423]: `Test::Variant2` is the name of a struct or struct variant, but this expression uses it like a function name\r\n  --> file3.rs:10:13\r\n   |\r\n10 |     let y = Test::Variant2(\"Hello\");\r\n   |             ^^^^^^^^^^^^^^ struct called like a function\r\n   |\r\n   = help: did you mean to write: `Test::Variant2 { /* fields */ }`?\r\n\r\nerror: `Test::Variant` is the name of a data-less enum, but this expression uses it like a function name\r\n --> file3.rs:9:13\r\n  |\r\n9 |     let x = Test::Variant(\"World\");\r\n  |             ^^^^^^^^^^^^^^^^^^^^^^ data-less enum called like a function\r\n  |\r\n  = help: did you mean to write: `Test::Variant`?\r\nnote: defined here\r\n --> file3.rs:2:5\r\n  |\r\n2 |     Variant,\r\n  |     ^^^^^^^\r\n\r\nerror: aborting due to previous error\r\n```\r\n\r\nRe: #28533"},"comment":{"url":"https://api.github.com/repos/rust-lang/rust/issues/comments/247719855","html_url":"https://github.com/rust-lang/rust/pull/36520#issuecomment-247719855","issue_url":"https://api.github.com/repos/rust-lang/rust/issues/36520","id":247719855,"user":{"login":"GuillaumeGomez","id":3050060,"avatar_url":"https://avatars.githubusercontent.com/u/3050060?v=3","gravatar_id":"","url":"https://api.github.com/users/GuillaumeGomez","html_url":"https://github.com/GuillaumeGomez","followers_url":"https://api.github.com/users/GuillaumeGomez/followers","following_url":"https://api.github.com/users/GuillaumeGomez/following{/other_user}","gists_url":"https://api.github.com/users/GuillaumeGomez/gists{/gist_id}","starred_url":"https://api.github.com/users/GuillaumeGomez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GuillaumeGomez/subscriptions","organizations_url":"https://api.github.com/users/GuillaumeGomez/orgs","repos_url":"https://api.github.com/users/GuillaumeGomez/repos","events_url":"https://api.github.com/users/GuillaumeGomez/events{/privacy}","received_events_url":"https://api.github.com/users/GuillaumeGomez/received_events","type":"User","site_admin":false},"created_at":"2016-09-16T22:05:35Z","updated_at":"2016-09-16T22:05:35Z","body":"I agree with @petrochenkov here: people are using rust after all. If they don't know what a terminology is, it just means that they still need to learn it. Having a difference between \"technical side\" and any other side will bring more problems than solutions."}}
{"actor":{"display_login":"GuillaumeGomez"}}