{"action":"created","issue":{"url":"https://api.github.com/repos/rust-rfcs/const-eval/issues/8","repository_url":"https://api.github.com/repos/rust-rfcs/const-eval","labels_url":"https://api.github.com/repos/rust-rfcs/const-eval/issues/8/labels{/name}","comments_url":"https://api.github.com/repos/rust-rfcs/const-eval/issues/8/comments","events_url":"https://api.github.com/repos/rust-rfcs/const-eval/issues/8/events","html_url":"https://github.com/rust-rfcs/const-eval/pull/8","id":367195958,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIwNjg5NzA5","number":8,"title":"RFC for trait bounds on generic parameters of const fns","user":{"login":"oli-obk","id":332036,"node_id":"MDQ6VXNlcjMzMjAzNg==","avatar_url":"https://avatars2.githubusercontent.com/u/332036?v=4","gravatar_id":"","url":"https://api.github.com/users/oli-obk","html_url":"https://github.com/oli-obk","followers_url":"https://api.github.com/users/oli-obk/followers","following_url":"https://api.github.com/users/oli-obk/following{/other_user}","gists_url":"https://api.github.com/users/oli-obk/gists{/gist_id}","starred_url":"https://api.github.com/users/oli-obk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oli-obk/subscriptions","organizations_url":"https://api.github.com/users/oli-obk/orgs","repos_url":"https://api.github.com/users/oli-obk/repos","events_url":"https://api.github.com/users/oli-obk/events{/privacy}","received_events_url":"https://api.github.com/users/oli-obk/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2018-10-05T12:46:46Z","updated_at":"2018-11-05T09:20:04Z","closed_at":null,"author_association":"COLLABORATOR","pull_request":{"url":"https://api.github.com/repos/rust-rfcs/const-eval/pulls/8","html_url":"https://github.com/rust-rfcs/const-eval/pull/8","diff_url":"https://github.com/rust-rfcs/const-eval/pull/8.diff","patch_url":"https://github.com/rust-rfcs/const-eval/pull/8.patch"},"body":"[Rendered](https://github.com/rust-rfcs/const-eval/blob/generic_const_fn_bounds/const-generic-const-fn-bounds.md)\r\n\r\ncc @Centril @RalfJung @eddyb\r\n\r\nOnce we have gone through the process here, I'll post the final result on the regular RFC repo\r\n\r\nPrevious discussion: https://github.com/rust-rfcs/const-eval/issues/1\r\n\r\nGlossary:\r\n\r\n* [RPIT](https://github.com/rust-lang/rust/issues/34511) (return position impl trait)\r\n* [const context](https://rust-lang-nursery.github.io/rustc-guide/const-eval.html)"},"comment":{"url":"https://api.github.com/repos/rust-rfcs/const-eval/issues/comments/435806270","html_url":"https://github.com/rust-rfcs/const-eval/pull/8#issuecomment-435806270","issue_url":"https://api.github.com/repos/rust-rfcs/const-eval/issues/8","id":435806270,"node_id":"MDEyOklzc3VlQ29tbWVudDQzNTgwNjI3MA==","user":{"login":"oli-obk","id":332036,"node_id":"MDQ6VXNlcjMzMjAzNg==","avatar_url":"https://avatars2.githubusercontent.com/u/332036?v=4","gravatar_id":"","url":"https://api.github.com/users/oli-obk","html_url":"https://github.com/oli-obk","followers_url":"https://api.github.com/users/oli-obk/followers","following_url":"https://api.github.com/users/oli-obk/following{/other_user}","gists_url":"https://api.github.com/users/oli-obk/gists{/gist_id}","starred_url":"https://api.github.com/users/oli-obk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oli-obk/subscriptions","organizations_url":"https://api.github.com/users/oli-obk/orgs","repos_url":"https://api.github.com/users/oli-obk/repos","events_url":"https://api.github.com/users/oli-obk/events{/privacy}","received_events_url":"https://api.github.com/users/oli-obk/received_events","type":"User","site_admin":false},"created_at":"2018-11-05T09:20:04Z","updated_at":"2018-11-05T09:20:04Z","author_association":"COLLABORATOR","body":"> I don't think this provides a workable solution for deriving (short of #[derive(const Clone)] - which I don't hate, but I don't know if it fits in with everything\r\n\r\nThere's no way around this. Imagine the following situation:\r\n\r\n```rust\r\nstruct Foo;\r\nconst impl Clone for Foo {\r\n    fn clone(&self) -> Self { Foo }\r\n}\r\n#[derive(Clone)]\r\npub struct Bar(Foo);\r\n```\r\n\r\nIf we automagically made the derived `Clone` impl for `Bar` const, and internally changed the `const impl Clone for Foo` to `impl Clone for Foo`, we'd be breaking users of the crate that used `Bar::clone` in const contexts. This is exactly why we have `const fn` instead of inferring the constness from the body: semver compatibility."}}
{"actor":{"display_login":"oli-obk"}}