{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/rust/issues/29832","labels_url":"https://api.github.com/repos/rust-lang/rust/issues/29832/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rust/issues/29832/comments","events_url":"https://api.github.com/repos/rust-lang/rust/issues/29832/events","html_url":"https://github.com/rust-lang/rust/issues/29832","id":116925547,"number":29832,"title":"ICE: fictitious type <&'static str as AsOwned>::R in sizing_type_of()","user":{"login":"james-darkfox","id":637155,"avatar_url":"https://avatars.githubusercontent.com/u/637155?v=3","gravatar_id":"","url":"https://api.github.com/users/james-darkfox","html_url":"https://github.com/james-darkfox","followers_url":"https://api.github.com/users/james-darkfox/followers","following_url":"https://api.github.com/users/james-darkfox/following{/other_user}","gists_url":"https://api.github.com/users/james-darkfox/gists{/gist_id}","starred_url":"https://api.github.com/users/james-darkfox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/james-darkfox/subscriptions","organizations_url":"https://api.github.com/users/james-darkfox/orgs","repos_url":"https://api.github.com/users/james-darkfox/repos","events_url":"https://api.github.com/users/james-darkfox/events{/privacy}","received_events_url":"https://api.github.com/users/james-darkfox/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/rust-lang/rust/labels/A-traits","name":"A-traits","color":"d7e102"},{"url":"https://api.github.com/repos/rust-lang/rust/labels/I-ICE","name":"I-ICE","color":"e10c02"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-11-14T13:40:42Z","updated_at":"2015-11-14T17:22:45Z","closed_at":null,"body":"The following code causes a compiler panic.\r\n```rust\r\ntrait AsOwned { type R; }\r\nimpl<'a> AsOwned for &'a str { type R = String; }\r\nfn as_owned<'a>(a: &'a str) -> <&'a str as AsOwned>::R { a.to_owned() }\r\n```\r\nThis should resolve to a concrete type but instead panics with: [play.rust-lang.org](https://play.rust-lang.org/?gist=8bf32614ac5e24afa6ef&version=stable)\r\n```text\r\nerror: internal compiler error: fictitious type <&'static str as AsOwned>::R in\r\nsizing_type_of()\r\n```"},"comment":{"url":"https://api.github.com/repos/rust-lang/rust/issues/comments/156721486","html_url":"https://github.com/rust-lang/rust/issues/29832#issuecomment-156721486","issue_url":"https://api.github.com/repos/rust-lang/rust/issues/29832","id":156721486,"user":{"login":"arielb1","id":1830974,"avatar_url":"https://avatars.githubusercontent.com/u/1830974?v=3","gravatar_id":"","url":"https://api.github.com/users/arielb1","html_url":"https://github.com/arielb1","followers_url":"https://api.github.com/users/arielb1/followers","following_url":"https://api.github.com/users/arielb1/following{/other_user}","gists_url":"https://api.github.com/users/arielb1/gists{/gist_id}","starred_url":"https://api.github.com/users/arielb1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arielb1/subscriptions","organizations_url":"https://api.github.com/users/arielb1/orgs","repos_url":"https://api.github.com/users/arielb1/repos","events_url":"https://api.github.com/users/arielb1/events{/privacy}","received_events_url":"https://api.github.com/users/arielb1/received_events","type":"User","site_admin":false},"created_at":"2015-11-14T17:22:45Z","updated_at":"2015-11-14T17:22:45Z","body":"@eddyb \r\n\r\nRight. I had a branch fixing this, but it was killed due to rebase damage."}}