{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/rfcs/issues/1859","repository_url":"https://api.github.com/repos/rust-lang/rfcs","labels_url":"https://api.github.com/repos/rust-lang/rfcs/issues/1859/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rfcs/issues/1859/comments","events_url":"https://api.github.com/repos/rust-lang/rfcs/issues/1859/events","html_url":"https://github.com/rust-lang/rfcs/pull/1859","id":201990354,"number":1859,"title":"extend `?` to operate over other types","user":{"login":"nikomatsakis","id":155238,"avatar_url":"https://avatars3.githubusercontent.com/u/155238?v=3","gravatar_id":"","url":"https://api.github.com/users/nikomatsakis","html_url":"https://github.com/nikomatsakis","followers_url":"https://api.github.com/users/nikomatsakis/followers","following_url":"https://api.github.com/users/nikomatsakis/following{/other_user}","gists_url":"https://api.github.com/users/nikomatsakis/gists{/gist_id}","starred_url":"https://api.github.com/users/nikomatsakis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nikomatsakis/subscriptions","organizations_url":"https://api.github.com/users/nikomatsakis/orgs","repos_url":"https://api.github.com/users/nikomatsakis/repos","events_url":"https://api.github.com/users/nikomatsakis/events{/privacy}","received_events_url":"https://api.github.com/users/nikomatsakis/received_events","type":"User","site_admin":false},"labels":[{"id":216585564,"url":"https://api.github.com/repos/rust-lang/rfcs/labels/final-comment-period","name":"final-comment-period","color":"207de5","default":false},{"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":{"login":"nikomatsakis","id":155238,"avatar_url":"https://avatars3.githubusercontent.com/u/155238?v=3","gravatar_id":"","url":"https://api.github.com/users/nikomatsakis","html_url":"https://github.com/nikomatsakis","followers_url":"https://api.github.com/users/nikomatsakis/followers","following_url":"https://api.github.com/users/nikomatsakis/following{/other_user}","gists_url":"https://api.github.com/users/nikomatsakis/gists{/gist_id}","starred_url":"https://api.github.com/users/nikomatsakis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nikomatsakis/subscriptions","organizations_url":"https://api.github.com/users/nikomatsakis/orgs","repos_url":"https://api.github.com/users/nikomatsakis/repos","events_url":"https://api.github.com/users/nikomatsakis/events{/privacy}","received_events_url":"https://api.github.com/users/nikomatsakis/received_events","type":"User","site_admin":false},"assignees":[{"login":"nikomatsakis","id":155238,"avatar_url":"https://avatars3.githubusercontent.com/u/155238?v=3","gravatar_id":"","url":"https://api.github.com/users/nikomatsakis","html_url":"https://github.com/nikomatsakis","followers_url":"https://api.github.com/users/nikomatsakis/followers","following_url":"https://api.github.com/users/nikomatsakis/following{/other_user}","gists_url":"https://api.github.com/users/nikomatsakis/gists{/gist_id}","starred_url":"https://api.github.com/users/nikomatsakis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nikomatsakis/subscriptions","organizations_url":"https://api.github.com/users/nikomatsakis/orgs","repos_url":"https://api.github.com/users/nikomatsakis/repos","events_url":"https://api.github.com/users/nikomatsakis/events{/privacy}","received_events_url":"https://api.github.com/users/nikomatsakis/received_events","type":"User","site_admin":false}],"milestone":null,"comments":91,"created_at":"2017-01-19T22:10:25Z","updated_at":"2017-04-12T20:51:16Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/rust-lang/rfcs/pulls/1859","html_url":"https://github.com/rust-lang/rfcs/pull/1859","diff_url":"https://github.com/rust-lang/rfcs/pull/1859.diff","patch_url":"https://github.com/rust-lang/rfcs/pull/1859.patch"},"body":"Introduce a trait `Try` for customizing the behavior of the `?` operator when applied to types other than `Result`.\r\n\r\nFixes #1718.\r\n\r\nRendered: https://github.com/nikomatsakis/rfcs/blob/try-trait/text/0000-try-trait.md"},"comment":{"url":"https://api.github.com/repos/rust-lang/rfcs/issues/comments/293703807","html_url":"https://github.com/rust-lang/rfcs/pull/1859#issuecomment-293703807","issue_url":"https://api.github.com/repos/rust-lang/rfcs/issues/1859","id":293703807,"user":{"login":"scottmcm","id":18526288,"avatar_url":"https://avatars1.githubusercontent.com/u/18526288?v=3","gravatar_id":"","url":"https://api.github.com/users/scottmcm","html_url":"https://github.com/scottmcm","followers_url":"https://api.github.com/users/scottmcm/followers","following_url":"https://api.github.com/users/scottmcm/following{/other_user}","gists_url":"https://api.github.com/users/scottmcm/gists{/gist_id}","starred_url":"https://api.github.com/users/scottmcm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scottmcm/subscriptions","organizations_url":"https://api.github.com/users/scottmcm/orgs","repos_url":"https://api.github.com/users/scottmcm/repos","events_url":"https://api.github.com/users/scottmcm/events{/privacy}","received_events_url":"https://api.github.com/users/scottmcm/received_events","type":"User","site_admin":false},"created_at":"2017-04-12T20:51:16Z","updated_at":"2017-04-12T20:51:16Z","body":"> There is a separate, but important, side-question of whether we want the \"success type\" of ? to be dependent on the enclosing context.\r\n\r\nThe auto-`Ok`-wrapping of `catch` blocks is also a reason to not allow it.  I want the type mismatch error message in `Poll<(),E>` context to be \"expected catch block to return `()`, but got `Vec<_>`\".  If the success type were to be contextual, it'd probably have to be something like \"no implementation of `CatchSuccess<Vec<_>>` found for `Poll<(),E>`\".\r\n\r\n> There has yet to be a kind of \"killer argument\" one way or the other. \r\n\r\nI think my [introduction argument](https://github.com/rust-lang/rfcs/pull/1859#issuecomment-286393549) is persuasive that we need at least this much of Carrier (modulo naming, of course):\r\n```\r\npub trait Carrier {\r\n    type Success;\r\n    type Error;\r\n    fn from_success(_: Self::Success) -> Self;\r\n    fn from_error(_: Self::Error) -> Self;\r\n}\r\n```\r\n\r\nI agree that the type conversion question isn't clear-cut."}}
{"actor":{"display_login":"scottmcm"}}