{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/rfcs/issues/2353","repository_url":"https://api.github.com/repos/rust-lang/rfcs","labels_url":"https://api.github.com/repos/rust-lang/rfcs/issues/2353/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rfcs/issues/2353/comments","events_url":"https://api.github.com/repos/rust-lang/rfcs/issues/2353/events","html_url":"https://github.com/rust-lang/rfcs/pull/2353","id":300671911,"number":2353,"title":"RFC: `#[derive_no_bound(..)]` and `#[derive_field_bound(..)]`","user":{"login":"Centril","id":855702,"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},"labels":[{"id":211667886,"url":"https://api.github.com/repos/rust-lang/rfcs/labels/T-lang","name":"T-lang","color":"bfd4f2","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2018-02-27T15:19:05Z","updated_at":"2018-02-28T13:15:01Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/rust-lang/rfcs/pulls/2353","html_url":"https://github.com/rust-lang/rfcs/pull/2353","diff_url":"https://github.com/rust-lang/rfcs/pull/2353.diff","patch_url":"https://github.com/rust-lang/rfcs/pull/2353.patch"},"body":"### [🖼️ Rendered](https://github.com/Centril/rfcs/blob/rfc/derive-bound-control/text/0000-derive-bound-control.md)\r\n\r\n### 📝 Summary\r\n\r\nThis RFC gives users a way to control trait bounds on derived implementations by allowing them to omit default bounds on type parameters or add bounds for field types. This is achieved with the two attributes `#[derive_no_bound(Trait)]` and `#[derive_field_bound(Trait)]`.\r\n\r\nThe semantics of `#[derive_no_bound(Trait)]` for a type parameter `P` are:\r\nThe type parameter `P` does not need to satisfy `Trait` for any field referencing it to be `Trait`\r\n\r\nThe semantics of `#[derive_field_bound(Trait)]` on a field are that the type of the field is added to the `where`-clause of the referenced `Trait` as: `FieldType: Trait`.\r\n\r\n### 💖 Thanks\r\n\r\nThanks to @nox for collaborating on this RFC with me as well as @kennytm for providing some great input."},"comment":{"url":"https://api.github.com/repos/rust-lang/rfcs/issues/comments/369235367","html_url":"https://github.com/rust-lang/rfcs/pull/2353#issuecomment-369235367","issue_url":"https://api.github.com/repos/rust-lang/rfcs/issues/2353","id":369235367,"user":{"login":"stbuehler","id":528446,"avatar_url":"https://avatars1.githubusercontent.com/u/528446?v=4","gravatar_id":"","url":"https://api.github.com/users/stbuehler","html_url":"https://github.com/stbuehler","followers_url":"https://api.github.com/users/stbuehler/followers","following_url":"https://api.github.com/users/stbuehler/following{/other_user}","gists_url":"https://api.github.com/users/stbuehler/gists{/gist_id}","starred_url":"https://api.github.com/users/stbuehler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stbuehler/subscriptions","organizations_url":"https://api.github.com/users/stbuehler/orgs","repos_url":"https://api.github.com/users/stbuehler/repos","events_url":"https://api.github.com/users/stbuehler/events{/privacy}","received_events_url":"https://api.github.com/users/stbuehler/received_events","type":"User","site_admin":false},"created_at":"2018-02-28T13:15:01Z","updated_at":"2018-02-28T13:15:01Z","author_association":"NONE","body":"My feeling is that in Rust it is preferred to have more code over having compact and unreadable code.\r\n\r\nMaybe you could use macros to organize your types in a more compact way.\r\n\r\nIt seems you're also motivated by some time constraints, but it is not obvious why those are relevant for the Rust community.\r\n\r\nAll in all I'd still like to see the feature itself; so if the requirement is that customizing the bounds for derive needs to be done in attributes in the type definition, you're proposal seems overall fine to me."}}
{"actor":{"display_login":"stbuehler"}}