{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/rust/issues/54828","repository_url":"https://api.github.com/repos/rust-lang/rust","labels_url":"https://api.github.com/repos/rust-lang/rust/issues/54828/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rust/issues/54828/comments","events_url":"https://api.github.com/repos/rust-lang/rust/issues/54828/events","html_url":"https://github.com/rust-lang/rust/issues/54828","id":366991537,"node_id":"MDU6SXNzdWUzNjY5OTE1Mzc=","number":54828,"title":"#[must_use] is permitted on functions without return type","user":{"login":"abonander","id":3198595,"node_id":"MDQ6VXNlcjMxOTg1OTU=","avatar_url":"https://avatars1.githubusercontent.com/u/3198595?v=4","gravatar_id":"","url":"https://api.github.com/users/abonander","html_url":"https://github.com/abonander","followers_url":"https://api.github.com/users/abonander/followers","following_url":"https://api.github.com/users/abonander/following{/other_user}","gists_url":"https://api.github.com/users/abonander/gists{/gist_id}","starred_url":"https://api.github.com/users/abonander/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abonander/subscriptions","organizations_url":"https://api.github.com/users/abonander/orgs","repos_url":"https://api.github.com/users/abonander/repos","events_url":"https://api.github.com/users/abonander/events{/privacy}","received_events_url":"https://api.github.com/users/abonander/received_events","type":"User","site_admin":false},"labels":[{"id":234948,"node_id":"MDU6TGFiZWwyMzQ5NDg=","url":"https://api.github.com/repos/rust-lang/rust/labels/A-attributes","name":"A-attributes","color":"d7e102","default":false},{"id":235137,"node_id":"MDU6TGFiZWwyMzUxMzc=","url":"https://api.github.com/repos/rust-lang/rust/labels/A-lint","name":"A-lint","color":"d7e102","default":false},{"id":211668019,"node_id":"MDU6TGFiZWwyMTE2NjgwMTk=","url":"https://api.github.com/repos/rust-lang/rust/labels/T-lang","name":"T-lang","color":"bfd4f2","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":14,"created_at":"2018-10-04T22:16:56Z","updated_at":"2018-10-07T00:28:14Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"The following produces no warnings or errors:\r\n\r\n```rust\r\n#[must_use = \"function with no return type\"]\r\nfn foo() {}\r\n\r\nfn main() {\r\n    foo();\r\n}\r\n```\r\n\r\nIs this intended? Shouldn't it produce a lint warning on the attribute? This is a good mentoring issue, I can bang out instructions once I get an answer (fortunately this doesn't seem to involve hygiene this time so hopefully I should get it right... @petrochenkov)"},"comment":{"url":"https://api.github.com/repos/rust-lang/rust/issues/comments/427616042","html_url":"https://github.com/rust-lang/rust/issues/54828#issuecomment-427616042","issue_url":"https://api.github.com/repos/rust-lang/rust/issues/54828","id":427616042,"node_id":"MDEyOklzc3VlQ29tbWVudDQyNzYxNjA0Mg==","user":{"login":"Centril","id":855702,"node_id":"MDQ6VXNlcjg1NTcwMg==","avatar_url":"https://avatars2.githubusercontent.com/u/855702?v=4","gravatar_id":"","url":"https://api.github.com/users/Centril","html_url":"https://github.com/Centril","followers_url":"https://api.github.com/users/Centril/followers","following_url":"https://api.github.com/users/Centril/following{/other_user}","gists_url":"https://api.github.com/users/Centril/gists{/gist_id}","starred_url":"https://api.github.com/users/Centril/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Centril/subscriptions","organizations_url":"https://api.github.com/users/Centril/orgs","repos_url":"https://api.github.com/users/Centril/repos","events_url":"https://api.github.com/users/Centril/events{/privacy}","received_events_url":"https://api.github.com/users/Centril/received_events","type":"User","site_admin":false},"created_at":"2018-10-07T00:28:14Z","updated_at":"2018-10-07T00:28:14Z","author_association":"CONTRIBUTOR","body":"@abonander \r\n\r\n> Like @rkruppe said, custom ZSTs can have semantics attached to them so I don't think it's good to warn on #[must_use] for those.\r\n\r\nI was saying the opposite of that; i.e. that when you write `#[must_use]` on *any* function then a warning should be emitted irrespective of type, i.e. including `#[must_use] fn foo() {...}`."}}
{"actor":{"display_login":"Centril"}}