{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/rust/issues/51907","repository_url":"https://api.github.com/repos/rust-lang/rust","labels_url":"https://api.github.com/repos/rust-lang/rust/issues/51907/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rust/issues/51907/comments","events_url":"https://api.github.com/repos/rust-lang/rust/issues/51907/events","html_url":"https://github.com/rust-lang/rust/issues/51907","id":337092773,"node_id":"MDU6SXNzdWUzMzcwOTI3NzM=","number":51907,"title":"ICE when using an object-safe trait with methods marked as extern","user":{"login":"tuxmark5","id":506439,"node_id":"MDQ6VXNlcjUwNjQzOQ==","avatar_url":"https://avatars0.githubusercontent.com/u/506439?v=4","gravatar_id":"","url":"https://api.github.com/users/tuxmark5","html_url":"https://github.com/tuxmark5","followers_url":"https://api.github.com/users/tuxmark5/followers","following_url":"https://api.github.com/users/tuxmark5/following{/other_user}","gists_url":"https://api.github.com/users/tuxmark5/gists{/gist_id}","starred_url":"https://api.github.com/users/tuxmark5/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tuxmark5/subscriptions","organizations_url":"https://api.github.com/users/tuxmark5/orgs","repos_url":"https://api.github.com/users/tuxmark5/repos","events_url":"https://api.github.com/users/tuxmark5/events{/privacy}","received_events_url":"https://api.github.com/users/tuxmark5/received_events","type":"User","site_admin":false},"labels":[{"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":9618520,"node_id":"MDU6TGFiZWw5NjE4NTIw","url":"https://api.github.com/repos/rust-lang/rust/labels/I-ICE","name":"I-ICE","color":"e10c02","default":false},{"id":203429200,"node_id":"MDU6TGFiZWwyMDM0MjkyMDA=","url":"https://api.github.com/repos/rust-lang/rust/labels/P-high","name":"P-high","color":"eb6420","default":false},{"id":211668100,"node_id":"MDU6TGFiZWwyMTE2NjgxMDA=","url":"https://api.github.com/repos/rust-lang/rust/labels/T-compiler","name":"T-compiler","color":"bfd4f2","default":false},{"id":262252840,"node_id":"MDU6TGFiZWwyNjIyNTI4NDA=","url":"https://api.github.com/repos/rust-lang/rust/labels/regression-from-stable-to-stable","name":"regression-from-stable-to-stable","color":"e4008a","default":false}],"state":"closed","locked":false,"assignee":{"login":"eddyb","id":77424,"node_id":"MDQ6VXNlcjc3NDI0","avatar_url":"https://avatars2.githubusercontent.com/u/77424?v=4","gravatar_id":"","url":"https://api.github.com/users/eddyb","html_url":"https://github.com/eddyb","followers_url":"https://api.github.com/users/eddyb/followers","following_url":"https://api.github.com/users/eddyb/following{/other_user}","gists_url":"https://api.github.com/users/eddyb/gists{/gist_id}","starred_url":"https://api.github.com/users/eddyb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eddyb/subscriptions","organizations_url":"https://api.github.com/users/eddyb/orgs","repos_url":"https://api.github.com/users/eddyb/repos","events_url":"https://api.github.com/users/eddyb/events{/privacy}","received_events_url":"https://api.github.com/users/eddyb/received_events","type":"User","site_admin":false},"assignees":[{"login":"eddyb","id":77424,"node_id":"MDQ6VXNlcjc3NDI0","avatar_url":"https://avatars2.githubusercontent.com/u/77424?v=4","gravatar_id":"","url":"https://api.github.com/users/eddyb","html_url":"https://github.com/eddyb","followers_url":"https://api.github.com/users/eddyb/followers","following_url":"https://api.github.com/users/eddyb/following{/other_user}","gists_url":"https://api.github.com/users/eddyb/gists{/gist_id}","starred_url":"https://api.github.com/users/eddyb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eddyb/subscriptions","organizations_url":"https://api.github.com/users/eddyb/orgs","repos_url":"https://api.github.com/users/eddyb/repos","events_url":"https://api.github.com/users/eddyb/events{/privacy}","received_events_url":"https://api.github.com/users/eddyb/received_events","type":"User","site_admin":false}],"milestone":null,"comments":7,"created_at":"2018-06-29T18:20:56Z","updated_at":"2018-07-13T06:35:07Z","closed_at":"2018-07-12T03:24:28Z","author_association":"NONE","body":"This [snippet](https://play.rust-lang.org/?gist=2f2277e3297b73230b2c07337c9d4477&version=nightly&mode=debug) causes rustc to ICE:\r\n\r\n```Rust\r\ntrait Foo {\r\n    extern fn method(&self);\r\n}\r\n\r\nstruct Bar;\r\nimpl Foo for Bar { \r\n    extern fn method(&self) { }\r\n}\r\n\r\nfn main() {\r\n    let foo: Box<dyn Foo> = Box::new(Bar);\r\n    foo.method();\r\n}\r\n```\r\nrustc version: rustc 1.28.0-nightly (2a1c4eec4 2018-06-25)\r\n\r\nError message: \r\n```\r\nerror: internal compiler error: librustc_codegen_llvm/abi.rs:304: FnType::new_vtable: non-pair self ArgType { layout: TyLayout { ty: &Foo, details: LayoutDetails { variants: Single { index: 0 }, fields: Arbitrary { offsets: [Size { raw: 0 }, Size { raw: 8 }], memory_index: [0, 1] }, abi: ScalarPair(Scalar { value: Pointer, valid_range: 1..=18446744073709551615 }, Scalar { value: Pointer, valid_range: 1..=18446744073709551615 }), align: Align { abi_pow2: 3, pref_pow2: 3 }, size: Size { raw: 16 } } }, pad: None, mode: Direct(ArgAttributes { regular: (empty), pointee_size: Size { raw: 0 }, pointee_align: None }) }\r\n```"},"comment":{"url":"https://api.github.com/repos/rust-lang/rust/issues/comments/404740350","html_url":"https://github.com/rust-lang/rust/issues/51907#issuecomment-404740350","issue_url":"https://api.github.com/repos/rust-lang/rust/issues/51907","id":404740350,"node_id":"MDEyOklzc3VlQ29tbWVudDQwNDc0MDM1MA==","user":{"login":"eddyb","id":77424,"node_id":"MDQ6VXNlcjc3NDI0","avatar_url":"https://avatars2.githubusercontent.com/u/77424?v=4","gravatar_id":"","url":"https://api.github.com/users/eddyb","html_url":"https://github.com/eddyb","followers_url":"https://api.github.com/users/eddyb/followers","following_url":"https://api.github.com/users/eddyb/following{/other_user}","gists_url":"https://api.github.com/users/eddyb/gists{/gist_id}","starred_url":"https://api.github.com/users/eddyb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eddyb/subscriptions","organizations_url":"https://api.github.com/users/eddyb/orgs","repos_url":"https://api.github.com/users/eddyb/repos","events_url":"https://api.github.com/users/eddyb/events{/privacy}","received_events_url":"https://api.github.com/users/eddyb/received_events","type":"User","site_admin":false},"created_at":"2018-07-13T06:35:07Z","updated_at":"2018-07-13T06:35:07Z","author_association":"MEMBER","body":"Do we want to backport the fix or anything?"}}
{"actor":{"display_login":"eddyb"}}