{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/rust/issues/33545","repository_url":"https://api.github.com/repos/rust-lang/rust","labels_url":"https://api.github.com/repos/rust-lang/rust/issues/33545/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rust/issues/33545/comments","events_url":"https://api.github.com/repos/rust-lang/rust/issues/33545/events","html_url":"https://github.com/rust-lang/rust/issues/33545","id":154098274,"number":33545,"title":"Overflow while adding drop-check rules.","user":{"login":"kaminsod","id":12991611,"avatar_url":"https://avatars1.githubusercontent.com/u/12991611?v=3","gravatar_id":"","url":"https://api.github.com/users/kaminsod","html_url":"https://github.com/kaminsod","followers_url":"https://api.github.com/users/kaminsod/followers","following_url":"https://api.github.com/users/kaminsod/following{/other_user}","gists_url":"https://api.github.com/users/kaminsod/gists{/gist_id}","starred_url":"https://api.github.com/users/kaminsod/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaminsod/subscriptions","organizations_url":"https://api.github.com/users/kaminsod/orgs","repos_url":"https://api.github.com/users/kaminsod/repos","events_url":"https://api.github.com/users/kaminsod/events{/privacy}","received_events_url":"https://api.github.com/users/kaminsod/received_events","type":"User","site_admin":false},"labels":[{"id":235791,"url":"https://api.github.com/repos/rust-lang/rust/labels/A-diagnostics","name":"A-diagnostics","color":"d7e102","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-05-10T20:24:25Z","updated_at":"2017-05-04T00:34:13Z","closed_at":"2017-05-04T00:34:13Z","body":"Not sure if this is a bug or something I missed in my code, but seems to be the same as #29844. Issue present in stable, beta and nightly.\n\nhttps://play.rust-lang.org/?gist=5d30e353c7fac8f23e871367f774f9b0&version=stable&backtrace=0\n\n``` rust\n#[derive(Debug)]\nenum E1<T> {\n    V1(T),\n    V2(Box<E1<E2<T>>>)\n}\n\n#[derive(Debug)]\nenum E2<T> {\n    V1(usize, T),\n    V2(usize, T, T)\n}\n\nfn main() {\n    let wub = E1::V2(Box::new(E1::V1(E2::V1(1, \"wub\"))));\n\n    println!(\"{:?}\", wub);\n}\n```\n\nIssues on stable (similar issues on beta and nightly):\n\n> <anon>:14:9: 14:12 error: overflow while adding drop-check rules for E1<&str> [E0320]\n> <anon>:14     let wub = E1::V2(Box::new(E1::V1(E2::V1(1, \"wub\"))));\n>                   ^~~\n> <anon>:14:9: 14:12 note: overflowed on enum E2 variant V1 field #0 type: usize\n> <anon>:14     let wub = E1::V2(Box::new(E1::V1(E2::V1(1, \"wub\"))));\n>                   ^~~\n> <anon>:14:15: 14:57 error: overflow while adding drop-check rules for E1<&str> [E0320]\n> <anon>:14     let wub = E1::V2(Box::new(E1::V1(E2::V1(1, \"wub\"))));\n>                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n> <anon>:14:15: 14:57 note: overflowed on enum E2 variant V1 field #0 type: usize\n> <anon>:14     let wub = E1::V2(Box::new(E1::V1(E2::V1(1, \"wub\"))));\n>                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n> <anon>:14:22: 14:56 error: overflow while adding drop-check rules for Box<E1<E2<&str>>> [E0320]\n> <anon>:14     let wub = E1::V2(Box::new(E1::V1(E2::V1(1, \"wub\"))));\n>                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n> <anon>:14:22: 14:56 note: overflowed on enum E1 variant V1 field #0 type: E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<&str>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\n> <anon>:14     let wub = E1::V2(Box::new(E1::V1(E2::V1(1, \"wub\"))));\n>                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n> <anon>:14:31: 14:55 error: overflow while adding drop-check rules for E1<E2<&str>> [E0320]\n> <anon>:14     let wub = E1::V2(Box::new(E1::V1(E2::V1(1, \"wub\"))));\n>                                         ^~~~~~~~~~~~~~~~~~~~~~~~\n> <anon>:14:31: 14:55 note: overflowed on enum E2 variant V1 field #0 type: usize\n> <anon>:14     let wub = E1::V2(Box::new(E1::V1(E2::V1(1, \"wub\"))));\n"},"comment":{"url":"https://api.github.com/repos/rust-lang/rust/issues/comments/299072560","html_url":"https://github.com/rust-lang/rust/issues/33545#issuecomment-299072560","issue_url":"https://api.github.com/repos/rust-lang/rust/issues/33545","id":299072560,"user":{"login":"Mark-Simulacrum","id":5047365,"avatar_url":"https://avatars3.githubusercontent.com/u/5047365?v=3","gravatar_id":"","url":"https://api.github.com/users/Mark-Simulacrum","html_url":"https://github.com/Mark-Simulacrum","followers_url":"https://api.github.com/users/Mark-Simulacrum/followers","following_url":"https://api.github.com/users/Mark-Simulacrum/following{/other_user}","gists_url":"https://api.github.com/users/Mark-Simulacrum/gists{/gist_id}","starred_url":"https://api.github.com/users/Mark-Simulacrum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mark-Simulacrum/subscriptions","organizations_url":"https://api.github.com/users/Mark-Simulacrum/orgs","repos_url":"https://api.github.com/users/Mark-Simulacrum/repos","events_url":"https://api.github.com/users/Mark-Simulacrum/events{/privacy}","received_events_url":"https://api.github.com/users/Mark-Simulacrum/received_events","type":"User","site_admin":false},"created_at":"2017-05-04T00:34:13Z","updated_at":"2017-05-04T00:34:13Z","body":"Closing in favor of #4287."}}
{"actor":{"display_login":"Mark-Simulacrum"}}