{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/rust/issues/48411","repository_url":"https://api.github.com/repos/rust-lang/rust","labels_url":"https://api.github.com/repos/rust-lang/rust/issues/48411/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rust/issues/48411/comments","events_url":"https://api.github.com/repos/rust-lang/rust/issues/48411/events","html_url":"https://github.com/rust-lang/rust/pull/48411","id":299151104,"number":48411,"title":"introduce canonical queries, use for normalization and dropck-outlives","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":583436937,"url":"https://api.github.com/repos/rust-lang/rust/labels/S-waiting-on-author","name":"S-waiting-on-author","color":"d3dddd","default":false}],"state":"open","locked":false,"assignee":{"login":"eddyb","id":77424,"avatar_url":"https://avatars2.githubusercontent.com/u/77424?v=4","gravatar_id":"","url":"https://api.github.com/users/eddyb","html_url":"https://github.com/eddyb","followers_url":"https://api.github.com/users/eddyb/followers","following_url":"https://api.github.com/users/eddyb/following{/other_user}","gists_url":"https://api.github.com/users/eddyb/gists{/gist_id}","starred_url":"https://api.github.com/users/eddyb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eddyb/subscriptions","organizations_url":"https://api.github.com/users/eddyb/orgs","repos_url":"https://api.github.com/users/eddyb/repos","events_url":"https://api.github.com/users/eddyb/events{/privacy}","received_events_url":"https://api.github.com/users/eddyb/received_events","type":"User","site_admin":false},"assignees":[{"login":"eddyb","id":77424,"avatar_url":"https://avatars2.githubusercontent.com/u/77424?v=4","gravatar_id":"","url":"https://api.github.com/users/eddyb","html_url":"https://github.com/eddyb","followers_url":"https://api.github.com/users/eddyb/followers","following_url":"https://api.github.com/users/eddyb/following{/other_user}","gists_url":"https://api.github.com/users/eddyb/gists{/gist_id}","starred_url":"https://api.github.com/users/eddyb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eddyb/subscriptions","organizations_url":"https://api.github.com/users/eddyb/orgs","repos_url":"https://api.github.com/users/eddyb/repos","events_url":"https://api.github.com/users/eddyb/events{/privacy}","received_events_url":"https://api.github.com/users/eddyb/received_events","type":"User","site_admin":false}],"milestone":null,"comments":76,"created_at":"2018-02-21T22:21:12Z","updated_at":"2018-03-06T01:05:14Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/rust-lang/rust/pulls/48411","html_url":"https://github.com/rust-lang/rust/pull/48411","diff_url":"https://github.com/rust-lang/rust/pull/48411.diff","patch_url":"https://github.com/rust-lang/rust/pull/48411.patch"},"body":"This branch adds in the concept of a **canonicalized trait query** and uses it for three specific operations:\r\n\r\n- `infcx.at(cause, param_env).normalize(type_foldable)`\r\n    - normalizes all associated types in `type_foldable`\r\n- `tcx.normalize_erasing_regions(param_env, type_foldable)`\r\n    - like normalize, but erases regions first and in the result; this leads to better caching\r\n- `infcx.at(cause, param_env).dropck_outlives(ty)`\r\n    - produces the set of types that must be live when a value of type `ty` is dropped\r\n    - used from dropck but also NLL outlives\r\n\r\nThis is a kind of \"first step\" towards a more Chalk-ified approach. It leads to a **big** speedup for NLL, which is basically dominated by the dropck-outlives computation. Here are some timing measurements for the `syn` crate (pre-branch measurements coming soon):\r\n\r\n| Commit | NLL disabled | NLL enabled |\r\n| ------- | --- | --- |\r\n| Before my branch | 5.43s | 8.99s |\r\n| After my branch | 5.36s | 7.25s |\r\n\r\n(Note that NLL enabled still does *all the work* that NLL disabled does, so this is not really a way to compare the performance of NLL versus the AST-based borrow checker directly.) Since this affects all codepaths, I'd like to do a full perf run before we land anything.\r\n\r\nAlso, this is not the \"final point\" for canonicalization etc. I think canonicalization can be made substantially faster, for one thing. But it seems like a reasonable starting point for a branch that's gotten a bit larger than I would have liked.\r\n\r\n**Commit convention:** First of all, this entire branch ought to be a \"pure refactoring\", I believe, not changing anything about external behavior. Second, I've tagged the most important commits with `[VIC]` (very important commit), so you can scan for those. =)\r\n\r\nr? @eddyb "},"comment":{"url":"https://api.github.com/repos/rust-lang/rust/issues/comments/370623970","html_url":"https://github.com/rust-lang/rust/pull/48411#issuecomment-370623970","issue_url":"https://api.github.com/repos/rust-lang/rust/issues/48411","id":370623970,"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":"2018-03-06T01:05:14Z","updated_at":"2018-03-06T01:05:14Z","author_association":"CONTRIBUTOR","body":"@bors try\r\n"}}
{"actor":{"display_login":"nikomatsakis"}}