{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/rust/issues/23992","labels_url":"https://api.github.com/repos/rust-lang/rust/issues/23992/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rust/issues/23992/comments","events_url":"https://api.github.com/repos/rust-lang/rust/issues/23992/events","html_url":"https://github.com/rust-lang/rust/issues/23992","id":66044084,"number":23992,"title":"rustc stack overflow: recursive associated types","user":{"login":"seanmonstar","id":51479,"avatar_url":"https://avatars.githubusercontent.com/u/51479?v=3","gravatar_id":"","url":"https://api.github.com/users/seanmonstar","html_url":"https://github.com/seanmonstar","followers_url":"https://api.github.com/users/seanmonstar/followers","following_url":"https://api.github.com/users/seanmonstar/following{/other_user}","gists_url":"https://api.github.com/users/seanmonstar/gists{/gist_id}","starred_url":"https://api.github.com/users/seanmonstar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/seanmonstar/subscriptions","organizations_url":"https://api.github.com/users/seanmonstar/orgs","repos_url":"https://api.github.com/users/seanmonstar/repos","events_url":"https://api.github.com/users/seanmonstar/events{/privacy}","received_events_url":"https://api.github.com/users/seanmonstar/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-ICE","name":"I-ICE","color":"e10c02"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-04-03T01:02:38Z","updated_at":"2015-04-08T01:46:26Z","closed_at":null,"body":"```rust\r\ntrait Foo {\r\n    type Bar;\r\n    fn foo(self) -> Self::Bar;\r\n}\r\n\r\nimpl Foo for Box<Foo> {\r\n    type Bar = <Self as Foo>::Bar;\r\n    fn foo(self) -> <Self as Foo>::Bar {\r\n        (*self).foo()\r\n    }\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/rust-lang/rust/issues/comments/90777544","html_url":"https://github.com/rust-lang/rust/issues/23992#issuecomment-90777544","issue_url":"https://api.github.com/repos/rust-lang/rust/issues/23992","id":90777544,"user":{"login":"apoelstra","id":1351933,"avatar_url":"https://avatars.githubusercontent.com/u/1351933?v=3","gravatar_id":"","url":"https://api.github.com/users/apoelstra","html_url":"https://github.com/apoelstra","followers_url":"https://api.github.com/users/apoelstra/followers","following_url":"https://api.github.com/users/apoelstra/following{/other_user}","gists_url":"https://api.github.com/users/apoelstra/gists{/gist_id}","starred_url":"https://api.github.com/users/apoelstra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apoelstra/subscriptions","organizations_url":"https://api.github.com/users/apoelstra/orgs","repos_url":"https://api.github.com/users/apoelstra/repos","events_url":"https://api.github.com/users/apoelstra/events{/privacy}","received_events_url":"https://api.github.com/users/apoelstra/received_events","type":"User","site_admin":false},"created_at":"2015-04-08T01:46:26Z","updated_at":"2015-04-08T01:46:26Z","body":"I've encountered a variant of this bug (or is it another bug? please advise if so and I will post it separately):\r\n````\r\npub struct Receipt<T: Trait>(T);\r\npub struct Future<'a>(&'a bool);\r\n\r\npub trait Trait {\r\n    type Error;\r\n    fn ready(self) -> Self::Error;\r\n}\r\n\r\nimpl<'a> Trait for Future<'a> {\r\n    type Error = Receipt<Future<'a>>;\r\n    fn ready(mut self) -> Receipt<Future<'a>> {}\r\n}\r\n````\r\nIf I remove the lifetime, the stack overflow no longer occurs."}}