{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/rust/issues/26515","labels_url":"https://api.github.com/repos/rust-lang/rust/issues/26515/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rust/issues/26515/comments","events_url":"https://api.github.com/repos/rust-lang/rust/issues/26515/events","html_url":"https://github.com/rust-lang/rust/pull/26515","id":90274392,"number":26515,"title":"Fix ICE on recursively defined enum variant discriminant.","user":{"login":"quantheory","id":1740206,"avatar_url":"https://avatars.githubusercontent.com/u/1740206?v=3","gravatar_id":"","url":"https://api.github.com/users/quantheory","html_url":"https://github.com/quantheory","followers_url":"https://api.github.com/users/quantheory/followers","following_url":"https://api.github.com/users/quantheory/following{/other_user}","gists_url":"https://api.github.com/users/quantheory/gists{/gist_id}","starred_url":"https://api.github.com/users/quantheory/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/quantheory/subscriptions","organizations_url":"https://api.github.com/users/quantheory/orgs","repos_url":"https://api.github.com/users/quantheory/repos","events_url":"https://api.github.com/users/quantheory/events{/privacy}","received_events_url":"https://api.github.com/users/quantheory/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"nrc","id":762626,"avatar_url":"https://avatars.githubusercontent.com/u/762626?v=3","gravatar_id":"","url":"https://api.github.com/users/nrc","html_url":"https://github.com/nrc","followers_url":"https://api.github.com/users/nrc/followers","following_url":"https://api.github.com/users/nrc/following{/other_user}","gists_url":"https://api.github.com/users/nrc/gists{/gist_id}","starred_url":"https://api.github.com/users/nrc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nrc/subscriptions","organizations_url":"https://api.github.com/users/nrc/orgs","repos_url":"https://api.github.com/users/nrc/repos","events_url":"https://api.github.com/users/nrc/events{/privacy}","received_events_url":"https://api.github.com/users/nrc/received_events","type":"User","site_admin":false},"milestone":null,"comments":10,"created_at":"2015-06-23T03:16:58Z","updated_at":"2015-07-09T05:15:46Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/rust-lang/rust/pulls/26515","html_url":"https://github.com/rust-lang/rust/pull/26515","diff_url":"https://github.com/rust-lang/rust/pull/26515.diff","patch_url":"https://github.com/rust-lang/rust/pull/26515.patch"},"body":"Fixes #23302.\r\n\r\nNote that there's an odd situation regarding the following, most likely due to some inadequacy in `const_eval`:\r\n\r\n```rust\r\nenum Y {\r\n    A = 1usize,\r\n    B,\r\n}\r\n```\r\n\r\nIn this case, `Y::B as usize` might be considered a constant expression in some cases, but not others.  (See #23513, for a related problem where there is only one variant, with no discriminant, and it doesn't behave nicely as a constant expression either.)\r\n\r\nMost of the complexity in this PR is basically future-proofing, to ensure that when `Y::B as usize` is fully made to be a constant expression, it can't be used to set `Y::A`, and thus indirectly itself."},"comment":{"url":"https://api.github.com/repos/rust-lang/rust/issues/comments/119821119","html_url":"https://github.com/rust-lang/rust/pull/26515#issuecomment-119821119","issue_url":"https://api.github.com/repos/rust-lang/rust/issues/26515","id":119821119,"user":{"login":"bors","id":3372342,"avatar_url":"https://avatars.githubusercontent.com/u/3372342?v=3","gravatar_id":"","url":"https://api.github.com/users/bors","html_url":"https://github.com/bors","followers_url":"https://api.github.com/users/bors/followers","following_url":"https://api.github.com/users/bors/following{/other_user}","gists_url":"https://api.github.com/users/bors/gists{/gist_id}","starred_url":"https://api.github.com/users/bors/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bors/subscriptions","organizations_url":"https://api.github.com/users/bors/orgs","repos_url":"https://api.github.com/users/bors/repos","events_url":"https://api.github.com/users/bors/events{/privacy}","received_events_url":"https://api.github.com/users/bors/received_events","type":"User","site_admin":false},"created_at":"2015-07-09T05:15:46Z","updated_at":"2015-07-09T05:15:46Z","body":":sunny: Test successful - [auto-linux-32-nopt-t](http://buildbot.rust-lang.org/builders/auto-linux-32-nopt-t/builds/5635), [auto-linux-32-opt](http://buildbot.rust-lang.org/builders/auto-linux-32-opt/builds/5647), [auto-linux-64-nopt-t](http://buildbot.rust-lang.org/builders/auto-linux-64-nopt-t/builds/5593), [auto-linux-64-opt](http://buildbot.rust-lang.org/builders/auto-linux-64-opt/builds/5622), [auto-linux-64-x-android-t](http://buildbot.rust-lang.org/builders/auto-linux-64-x-android-t/builds/5594), [auto-mac-32-opt](http://buildbot.rust-lang.org/builders/auto-mac-32-opt/builds/5667), [auto-mac-64-nopt-t](http://buildbot.rust-lang.org/builders/auto-mac-64-nopt-t/builds/5659), [auto-mac-64-opt](http://buildbot.rust-lang.org/builders/auto-mac-64-opt/builds/5626), [auto-win-gnu-32-nopt-t](http://buildbot.rust-lang.org/builders/auto-win-gnu-32-nopt-t/builds/610), [auto-win-gnu-32-opt](http://buildbot.rust-lang.org/builders/auto-win-gnu-32-opt/builds/611), [auto-win-gnu-64-nopt-t](http://buildbot.rust-lang.org/builders/auto-win-gnu-64-nopt-t/builds/606), [auto-win-gnu-64-opt](http://buildbot.rust-lang.org/builders/auto-win-gnu-64-opt/builds/609)"}}