{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/rfcs/issues/2515","repository_url":"https://api.github.com/repos/rust-lang/rfcs","labels_url":"https://api.github.com/repos/rust-lang/rfcs/issues/2515/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rfcs/issues/2515/comments","events_url":"https://api.github.com/repos/rust-lang/rfcs/issues/2515/events","html_url":"https://github.com/rust-lang/rfcs/pull/2515","id":347692877,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA2MjM1NjQ0","number":2515,"title":"Permit impl Trait in type aliases","user":{"login":"varkor","id":3943692,"node_id":"MDQ6VXNlcjM5NDM2OTI=","avatar_url":"https://avatars1.githubusercontent.com/u/3943692?v=4","gravatar_id":"","url":"https://api.github.com/users/varkor","html_url":"https://github.com/varkor","followers_url":"https://api.github.com/users/varkor/followers","following_url":"https://api.github.com/users/varkor/following{/other_user}","gists_url":"https://api.github.com/users/varkor/gists{/gist_id}","starred_url":"https://api.github.com/users/varkor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/varkor/subscriptions","organizations_url":"https://api.github.com/users/varkor/orgs","repos_url":"https://api.github.com/users/varkor/repos","events_url":"https://api.github.com/users/varkor/events{/privacy}","received_events_url":"https://api.github.com/users/varkor/received_events","type":"User","site_admin":false},"labels":[{"id":211667886,"node_id":"MDU6TGFiZWwyMTE2Njc4ODY=","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":31,"created_at":"2018-08-05T12:09:14Z","updated_at":"2018-08-09T03:15:04Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/rust-lang/rfcs/pulls/2515","html_url":"https://github.com/rust-lang/rfcs/pull/2515","diff_url":"https://github.com/rust-lang/rfcs/pull/2515.diff","patch_url":"https://github.com/rust-lang/rfcs/pull/2515.patch"},"body":"Allow `impl Trait` to be used in type aliases, resolving the open question in [RFC 2071](https://github.com/rust-lang/rfcs/pull/2071) as to the concrete syntax for `existential type`. This makes it possible to write type aliases of the form:\r\n\r\n```rust\r\ntype Adder = impl Fn(usize) -> usize;\r\n// equivalent to: `existential type Adder: Fn(usize) -> usize;`\r\n```\r\n\r\n[Rendered.](https://github.com/varkor/rfcs/blob/impl-trait-type-aliases/text/0000-impl-trait-type-aliases.md)\r\n\r\nThanks to @rpjohnst and @Centril for their ideas, discussion and feedback."},"comment":{"url":"https://api.github.com/repos/rust-lang/rfcs/issues/comments/411623115","html_url":"https://github.com/rust-lang/rfcs/pull/2515#issuecomment-411623115","issue_url":"https://api.github.com/repos/rust-lang/rfcs/issues/2515","id":411623115,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMTYyMzExNQ==","user":{"login":"tikue","id":2915777,"node_id":"MDQ6VXNlcjI5MTU3Nzc=","avatar_url":"https://avatars1.githubusercontent.com/u/2915777?v=4","gravatar_id":"","url":"https://api.github.com/users/tikue","html_url":"https://github.com/tikue","followers_url":"https://api.github.com/users/tikue/followers","following_url":"https://api.github.com/users/tikue/following{/other_user}","gists_url":"https://api.github.com/users/tikue/gists{/gist_id}","starred_url":"https://api.github.com/users/tikue/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tikue/subscriptions","organizations_url":"https://api.github.com/users/tikue/orgs","repos_url":"https://api.github.com/users/tikue/repos","events_url":"https://api.github.com/users/tikue/events{/privacy}","received_events_url":"https://api.github.com/users/tikue/received_events","type":"User","site_admin":false},"created_at":"2018-08-09T03:15:04Z","updated_at":"2018-08-09T03:15:04Z","author_association":"NONE","body":"@contactomorph thanks for pointing out the \"ratchet\" concern. I think that's a valid one that should be added to this RFC's drawbacks.\r\n\r\n```rust\r\nuse std::fmt::Debug;\r\n\r\n// initial\r\nfn print(item: impl Debug) {\r\n    println!(\"{:?}\", item);\r\n}\r\n\r\n// ratcheting up\r\nfn print2<T: Debug>(item1: T, item2: T) {\r\n    println!(\"{:?}\", [item1, item2]);\r\n}\r\n\r\nfn printable() -> impl Debug {\r\n    1\r\n}\r\n\r\n// not exactly ratcheting up\r\ntype Printable = impl Debug;\r\nfn printable2() -> (Printable, Printable) {\r\n    (1, 2)\r\n}\r\n```"}}
{"actor":{"display_login":"tikue"}}