{"action":"closed","issue":{"url":"https://api.github.com/repos/rust-lang/rust/issues/48697","repository_url":"https://api.github.com/repos/rust-lang/rust","labels_url":"https://api.github.com/repos/rust-lang/rust/issues/48697/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rust/issues/48697/comments","events_url":"https://api.github.com/repos/rust-lang/rust/issues/48697/events","html_url":"https://github.com/rust-lang/rust/issues/48697","id":301994191,"node_id":"MDU6SXNzdWUzMDE5OTQxOTE=","number":48697,"title":"[NLL] ICE: unexpected region for local data with reference to closure","user":{"login":"matthewjasper","id":20113453,"node_id":"MDQ6VXNlcjIwMTEzNDUz","avatar_url":"https://avatars1.githubusercontent.com/u/20113453?v=4","gravatar_id":"","url":"https://api.github.com/users/matthewjasper","html_url":"https://github.com/matthewjasper","followers_url":"https://api.github.com/users/matthewjasper/followers","following_url":"https://api.github.com/users/matthewjasper/following{/other_user}","gists_url":"https://api.github.com/users/matthewjasper/gists{/gist_id}","starred_url":"https://api.github.com/users/matthewjasper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matthewjasper/subscriptions","organizations_url":"https://api.github.com/users/matthewjasper/orgs","repos_url":"https://api.github.com/users/matthewjasper/repos","events_url":"https://api.github.com/users/matthewjasper/events{/privacy}","received_events_url":"https://api.github.com/users/matthewjasper/received_events","type":"User","site_admin":false},"labels":[{"id":604489711,"node_id":"MDU6TGFiZWw2MDQ0ODk3MTE=","url":"https://api.github.com/repos/rust-lang/rust/labels/A-NLL","name":"A-NLL","color":"d7e102","default":false},{"id":46741598,"node_id":"MDU6TGFiZWw0Njc0MTU5OA==","url":"https://api.github.com/repos/rust-lang/rust/labels/E-needstest","name":"E-needstest","color":"02e10c","default":false},{"id":867465703,"node_id":"MDU6TGFiZWw4Njc0NjU3MDM=","url":"https://api.github.com/repos/rust-lang/rust/labels/NLL-complete","name":"NLL-complete","color":"f799ea","default":false},{"id":211668100,"node_id":"MDU6TGFiZWwyMTE2NjgxMDA=","url":"https://api.github.com/repos/rust-lang/rust/labels/T-compiler","name":"T-compiler","color":"bfd4f2","default":false},{"id":693557751,"node_id":"MDU6TGFiZWw2OTM1NTc3NTE=","url":"https://api.github.com/repos/rust-lang/rust/labels/WG-compiler-nll","name":"WG-compiler-nll","color":"c2e0c6","default":false}],"state":"closed","locked":false,"assignee":{"login":"nikomatsakis","id":155238,"node_id":"MDQ6VXNlcjE1NTIzOA==","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,"node_id":"MDQ6VXNlcjE1NTIzOA==","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":5,"created_at":"2018-03-03T12:24:30Z","updated_at":"2018-08-27T11:13:10Z","closed_at":"2018-08-27T11:13:09Z","author_association":"CONTRIBUTOR","body":"The following code gives an internal compiler error. It is a normal compiler error without NLL.\r\n\r\n```rust\r\n#![feature(nll)]\r\n\r\nfn foo(x: &i32) -> &i32 {\r\n    let z = 4;\r\n    let f = &|y| { y };\r\n    let k = f(&z);\r\n    f(x)\r\n}\r\n\r\nfn main() {}\r\n```\r\n\r\n```text\r\nerror: internal compiler error: unexpected region for local data ReFree(DefId(0/0:3 ~ example[8787]::foo[0]), BrAnon(0))\r\n --> <source>:9:17\r\n  |\r\n6 |     let k = f(&z);\r\n  |                ^\r\nerror: aborting due to previous error\r\nCompiler returned: 101\r\n```"}}
{"actor":{"display_login":"nikomatsakis"}}