{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/rust/issues/23208","labels_url":"https://api.github.com/repos/rust-lang/rust/issues/23208/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rust/issues/23208/comments","events_url":"https://api.github.com/repos/rust-lang/rust/issues/23208/events","html_url":"https://github.com/rust-lang/rust/issues/23208","id":60284754,"number":23208,"title":"supertrait expansion needs normalization","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/rust/labels/A-associated-items","name":"A-associated-items","color":"d7e102"},{"url":"https://api.github.com/repos/rust-lang/rust/labels/I-wrong","name":"I-wrong","color":"e10c02"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-03-09T00:19:44Z","updated_at":"2015-03-10T11:02:09Z","closed_at":null,"body":"This example doesn't compile:\r\n\r\n```rust\r\ntrait TheSuperTrait<T> {\r\n    fn get(&self) -> T;\r\n}\r\n\r\nimpl TheTrait for i32 {\r\n    type Item = u32;\r\n}\r\n\r\nimpl TheSuperTrait<u32> for i32 {\r\n    fn get(&self) -> u32 {\r\n        *self as u32\r\n    }\r\n}\r\n\r\nfn foo<T:TheTrait<Item=u32>>(t: &T) -> u32 {\r\n    t.get()\r\n}\r\n\r\nfn main() {\r\n    foo::<i32>(&22);\r\n}\r\n```\r\n\r\nThis is because we fail to normalize during supertrait expansion."},"comment":{"url":"https://api.github.com/repos/rust-lang/rust/issues/comments/78033045","html_url":"https://github.com/rust-lang/rust/issues/23208#issuecomment-78033045","issue_url":"https://api.github.com/repos/rust-lang/rust/issues/23208","id":78033045,"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},"created_at":"2015-03-10T11:02:09Z","updated_at":"2015-03-10T11:02:09Z","body":"I suppose it is. That's kind of important isn't it :)"}}