{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/rfcs/issues/1214","labels_url":"https://api.github.com/repos/rust-lang/rfcs/issues/1214/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rfcs/issues/1214/comments","events_url":"https://api.github.com/repos/rust-lang/rfcs/issues/1214/events","html_url":"https://github.com/rust-lang/rfcs/pull/1214","id":95744414,"number":1214,"title":"[RFC] Clarify (and improve) rules for projections and well-formedness ","user":{"login":"nikomatsakis","id":155238,"avatar_url":"https://avatars.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":[{"url":"https://api.github.com/repos/rust-lang/rfcs/labels/final-comment-period","name":"final-comment-period","color":"207de5"},{"url":"https://api.github.com/repos/rust-lang/rfcs/labels/T-lang","name":"T-lang","color":"bfd4f2"}],"state":"closed","locked":false,"assignee":{"login":"nikomatsakis","id":155238,"avatar_url":"https://avatars.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":23,"created_at":"2015-07-17T21:04:14Z","updated_at":"2015-08-08T07:59:37Z","closed_at":"2015-08-07T12:05:04Z","pull_request":{"url":"https://api.github.com/repos/rust-lang/rfcs/pulls/1214","html_url":"https://github.com/rust-lang/rfcs/pull/1214","diff_url":"https://github.com/rust-lang/rfcs/pull/1214.diff","patch_url":"https://github.com/rust-lang/rfcs/pull/1214.patch"},"body":"Type system changes to address the outlives relation with respect to projections, and to better enforce that all types are well-formed (meaning that they respect their declared bounds). The current implementation can be both unsound (rust-lang/rust#24622), inconvenient (rust-lang/rust#23442), and surprising (rust-lang/rust#21748, rust-lang/rust#25692). The changes are as follows:\r\n\r\n- Simplify the outlives relation to be syntactically based.\r\n- Specify improved rules for the outlives relation and projections.\r\n- Specify more specifically where WF bounds are enforced, covering several cases missing from the implementation.\r\n\r\nThe proposed changes here have been tested and found to cause only a modest number of regressions (about two dozen root regressions were previously found on crates.io; however, that run did not yet include all the provisions from this RFC; updated numbers coming soon). In order to minimize the impact on users, the plan is to first introduce the changes in two stages:\r\n\r\n1. Initially, warnings will be issued for cases that violate the rules specified in this RFC. These warnings are not lints and cannot be silenced except by correcting the code such that it type-checks under the new rules.\r\n2. After one release cycle, those warnings will become errors.\r\n\r\nNote that although the changes do cause regressions, they also cause some code (like that in rust-lang/rust#23442) which currently gets errors to compile successfully.\r\n\r\ncc @rust-lang/lang \r\n\r\n[Rendered](https://github.com/nikomatsakis/rfcs/blob/projection-and-lifetimes/text/0000-projections-lifetimes-and-wf.md)"},"comment":{"url":"https://api.github.com/repos/rust-lang/rfcs/issues/comments/128928388","html_url":"https://github.com/rust-lang/rfcs/pull/1214#issuecomment-128928388","issue_url":"https://api.github.com/repos/rust-lang/rfcs/issues/1214","id":128928388,"user":{"login":"RalfJung","id":330628,"avatar_url":"https://avatars.githubusercontent.com/u/330628?v=3","gravatar_id":"","url":"https://api.github.com/users/RalfJung","html_url":"https://github.com/RalfJung","followers_url":"https://api.github.com/users/RalfJung/followers","following_url":"https://api.github.com/users/RalfJung/following{/other_user}","gists_url":"https://api.github.com/users/RalfJung/gists{/gist_id}","starred_url":"https://api.github.com/users/RalfJung/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RalfJung/subscriptions","organizations_url":"https://api.github.com/users/RalfJung/orgs","repos_url":"https://api.github.com/users/RalfJung/repos","events_url":"https://api.github.com/users/RalfJung/events{/privacy}","received_events_url":"https://api.github.com/users/RalfJung/received_events","type":"User","site_admin":false},"created_at":"2015-08-08T07:59:37Z","updated_at":"2015-08-08T07:59:37Z","body":"Ah, I had missed that you changed the text before merging. GitHub doesn't send an email notification for that :-/\r\n\r\nSo, most of my comments are addressed, thanks! The only remaining nit is the name of the rule in \"WF checking a trait reference\": I don't think it should be called \"WfObjectFragment\", right?"}}