{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/rust/issues/51296","repository_url":"https://api.github.com/repos/rust-lang/rust","labels_url":"https://api.github.com/repos/rust-lang/rust/issues/51296/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rust/issues/51296/comments","events_url":"https://api.github.com/repos/rust-lang/rust/issues/51296/events","html_url":"https://github.com/rust-lang/rust/issues/51296","id":328734304,"node_id":"MDU6SXNzdWUzMjg3MzQzMDQ=","number":51296,"title":"Recursive trait constraints crash compiler with exit code 3221225501","user":{"login":"bergus","id":1146478,"node_id":"MDQ6VXNlcjExNDY0Nzg=","avatar_url":"https://avatars0.githubusercontent.com/u/1146478?v=4","gravatar_id":"","url":"https://api.github.com/users/bergus","html_url":"https://github.com/bergus","followers_url":"https://api.github.com/users/bergus/followers","following_url":"https://api.github.com/users/bergus/following{/other_user}","gists_url":"https://api.github.com/users/bergus/gists{/gist_id}","starred_url":"https://api.github.com/users/bergus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bergus/subscriptions","organizations_url":"https://api.github.com/users/bergus/orgs","repos_url":"https://api.github.com/users/bergus/repos","events_url":"https://api.github.com/users/bergus/events{/privacy}","received_events_url":"https://api.github.com/users/bergus/received_events","type":"User","site_admin":false},"labels":[{"id":13836860,"node_id":"MDU6TGFiZWwxMzgzNjg2MA==","url":"https://api.github.com/repos/rust-lang/rust/labels/A-traits","name":"A-traits","color":"d7e102","default":false},{"id":650731663,"node_id":"MDU6TGFiZWw2NTA3MzE2NjM=","url":"https://api.github.com/repos/rust-lang/rust/labels/C-bug","name":"C-bug","color":"f5f1fd","default":false},{"id":630799571,"node_id":"MDU6TGFiZWw2MzA3OTk1NzE=","url":"https://api.github.com/repos/rust-lang/rust/labels/I-compilemem","name":"I-compilemem","color":"e10c02","default":false},{"id":64037154,"node_id":"MDU6TGFiZWw2NDAzNzE1NA==","url":"https://api.github.com/repos/rust-lang/rust/labels/I-compiletime","name":"I-compiletime","color":"e11d21","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-06-02T10:49:51Z","updated_at":"2018-06-03T01:40:46Z","closed_at":null,"author_association":"NONE","body":"I've got a crate that doesn't compile, it just starts eating memory until it stops without an error message. Only passing the `--verbose` flag to `cargo build` tells me\r\n```\r\nerror: Could not compile `the-crate`.\r\n\r\nCaused by:\r\n  process didn't exit successfully: `rustc …` (exit code: 3221225501)\r\n```\r\nSeems to be the same exit code as in #42544.\r\n\r\nHere's the (not exactly minimal) example to reproduce the issue:\r\n```rs\r\npub struct Example<A, B, D>\r\nwhere\r\n    A: StrategyA<Example<A, B, D>>,\r\n    B: StrategyB<Example<A, B, D>> {\r\n    pub a: A,\r\n    pub b: B,\r\n    pub element: B::Element,\r\n    pub data: D,\r\n}\r\npub trait StrategyA<T: HasData> {\r\n    fn do_a(&self, &T::Data);\r\n}\r\npub trait StrategyB<T> {\r\n    type Element;\r\n    fn do_b(&self, &T);\r\n}\r\nimpl<A: StrategyA<Self>, B: StrategyB<Self>, D> Example<A, B, D> {\r\n    pub fn do_it(&self, args: bool) {\r\n        if args {\r\n            self.a.do_a(self.get_data());\r\n        } else {\r\n            self.b.do_b(self);\r\n        }\r\n    }\r\n}\r\npub trait HasData {\r\n    type Data;\r\n    fn get_data(&self) -> &Self::Data;\r\n}\r\nimpl<A: StrategyA<Self>, B: StrategyB<Self>, D> HasData for Example<A, B, D> {\r\n    type Data = D;\r\n    fn get_data(&self) -> &D {\r\n        &self.data\r\n    }\r\n}\r\n\r\npub struct ExampleA;\r\npub struct ExampleB;\r\npub struct ExampleData;\r\n\r\nimpl<E: HasData<Data=ExampleData>> StrategyA<E> for ExampleA {\r\n    fn do_a(&self, e: &ExampleData) {\r\n        e; // using ExampleData here\r\n    }\r\n}\r\nimpl<E: HasData<Data=ExampleData>> StrategyB<E> for ExampleB {\r\n    type Element = ExampleData;\r\n    fn do_b(&self, e: &E) { /* same */}\r\n}\r\n\r\nfn x() {\r\n    let example = Example { a: ExampleA, b: ExampleB, data: ExampleData };\r\n    example.sized.do_it(true);\r\n    example.sized.do_it(false);\r\n}\r\n```\r\nRemoving the `StrategyA` parts causes it to produce an \"overflow evaluating the requirement …\" error, not sure whether related."},"comment":{"url":"https://api.github.com/repos/rust-lang/rust/issues/comments/394128759","html_url":"https://github.com/rust-lang/rust/issues/51296#issuecomment-394128759","issue_url":"https://api.github.com/repos/rust-lang/rust/issues/51296","id":394128759,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NDEyODc1OQ==","user":{"login":"ishitatsuyuki","id":12389383,"node_id":"MDQ6VXNlcjEyMzg5Mzgz","avatar_url":"https://avatars2.githubusercontent.com/u/12389383?v=4","gravatar_id":"","url":"https://api.github.com/users/ishitatsuyuki","html_url":"https://github.com/ishitatsuyuki","followers_url":"https://api.github.com/users/ishitatsuyuki/followers","following_url":"https://api.github.com/users/ishitatsuyuki/following{/other_user}","gists_url":"https://api.github.com/users/ishitatsuyuki/gists{/gist_id}","starred_url":"https://api.github.com/users/ishitatsuyuki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ishitatsuyuki/subscriptions","organizations_url":"https://api.github.com/users/ishitatsuyuki/orgs","repos_url":"https://api.github.com/users/ishitatsuyuki/repos","events_url":"https://api.github.com/users/ishitatsuyuki/events{/privacy}","received_events_url":"https://api.github.com/users/ishitatsuyuki/received_events","type":"User","site_admin":false},"created_at":"2018-06-03T01:40:46Z","updated_at":"2018-06-03T01:40:46Z","author_association":"MEMBER","body":"This looks like a case of the type checker taking exponential amount of computation + memory to reason about the type."}}
{"actor":{"display_login":"ishitatsuyuki"}}