{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/rfcs/issues/2093","repository_url":"https://api.github.com/repos/rust-lang/rfcs","labels_url":"https://api.github.com/repos/rust-lang/rfcs/issues/2093/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rfcs/issues/2093/comments","events_url":"https://api.github.com/repos/rust-lang/rfcs/issues/2093/events","html_url":"https://github.com/rust-lang/rfcs/pull/2093","id":247439530,"number":2093,"title":"Infer `T: 'x` outlives requirements on structs","user":{"login":"nikomatsakis","id":155238,"avatar_url":"https://avatars0.githubusercontent.com/u/155238?v=4","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":668044488,"url":"https://api.github.com/repos/rust-lang/rfcs/labels/Ergonomics%20Initiative","name":"Ergonomics Initiative","color":"0e8a16","default":false},{"id":631618415,"url":"https://api.github.com/repos/rust-lang/rfcs/labels/proposed-final-comment-period","name":"proposed-final-comment-period","color":"d4c5f9","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://avatars0.githubusercontent.com/u/155238?v=4","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://avatars0.githubusercontent.com/u/155238?v=4","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":7,"created_at":"2017-08-02T15:59:37Z","updated_at":"2017-08-23T00:04:49Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/rust-lang/rfcs/pulls/2093","html_url":"https://github.com/rust-lang/rfcs/pull/2093","diff_url":"https://github.com/rust-lang/rfcs/pull/2093.diff","patch_url":"https://github.com/rust-lang/rfcs/pull/2093.patch"},"body":"Remove the need for explicit `T: 'x` annotations on structs. We will\r\ninfer their presence based on the fields of the struct. In short, if\r\nthe struct contains a reference (directly or indirectly) to `T` with\r\nlifetime `'x`, then we will infer that `T: 'x` is a requirement:\r\n\r\n```rust\r\nstruct Foo<'x, T> {\r\n  // inferred: `T: 'x`\r\n  field: &'x T\r\n}\r\n```\r\n\r\nExplicit annotations remain as an option used to control trait object\r\nlifetime defaults, and simply for backwards compatibility.\r\n\r\n[Rendered](https://github.com/nikomatsakis/rfcs/blob/infer-outlives/text/0000-infer-outlives.md)"},"comment":{"url":"https://api.github.com/repos/rust-lang/rfcs/issues/comments/324184342","html_url":"https://github.com/rust-lang/rfcs/pull/2093#issuecomment-324184342","issue_url":"https://api.github.com/repos/rust-lang/rfcs/issues/2093","id":324184342,"user":{"login":"nikomatsakis","id":155238,"avatar_url":"https://avatars0.githubusercontent.com/u/155238?v=4","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},"created_at":"2017-08-23T00:04:49Z","updated_at":"2017-08-23T00:04:49Z","body":"@Vurich you may be interested in https://github.com/rust-lang/rust/issues/42516, which is tracking some of the improvements to lifetime errors that we are making. We are looking specifically at cases like these! I'd appreciate you adding comments to the issue as well."}}
{"actor":{"display_login":"nikomatsakis"}}