{"push_id":963456392,"size":3,"distinct_size":0,"ref":"refs/heads/master","head":"f511b21dbabfee44f3f69f4e9bcc7939c0ae72eb","before":"1096e7ab7afb14257798da82a1dd6aeadcb30100","commits":[{"sha":"418daa761e48c945a1efcd52dd6b98cef7bd4450","author":{"email":"d7e19930cc1f42c2d0781f4d9e6f1fe5891bf9cf@errno.com","name":"Sean Leffler"},"message":"Fix 31267, add rpass tests","distinct":false,"url":"https://api.github.com/repos/rust-lang/rust/commits/418daa761e48c945a1efcd52dd6b98cef7bd4450"},{"sha":"fb00e60ab1e7d5dac3c750d0e84a70236c40a2c3","author":{"email":"d7e19930cc1f42c2d0781f4d9e6f1fe5891bf9cf@errno.com","name":"Sean Leffler"},"message":"Added assertion ensuring zero-sized type.","distinct":false,"url":"https://api.github.com/repos/rust-lang/rust/commits/fb00e60ab1e7d5dac3c750d0e84a70236c40a2c3"},{"sha":"f511b21dbabfee44f3f69f4e9bcc7939c0ae72eb","author":{"email":"3a2c29237f73c7cf88424b80e427b1884f346b35@rust-lang.org","name":"bors"},"message":"Auto merge of #31326 - sdleffler:master, r=nikomatsakis\n\nAfter the truly incredible and embarrassing mess I managed to make in my last pull request, this should be a bit less messy.\n\nFixes #31267 - with this change, the code mentioned in the issue compiles.\n\nFound and fixed another issue as well - constants of zero-size types, when used in ExprRepeats inside associated constants, were causing the compiler to crash at the same place as #31267. An example of this:\n```\n\nstruct Bar;\n\nconst BAZ: Bar = Bar;\n\nstruct Foo([Bar; 1]);\n\nstruct Biz;\n\nimpl Biz {\n    const BAZ: Foo = Foo([BAZ; 1]);\n}\n\nfn main() {\n    let foo = Biz::BAZ;\n    println!(\"{:?}\", foo);\n}\n```\nHowever, I'm fairly certain that my fix for this is not as elegant as it could be. The problem seems to occur only with an associated constant of a tuple struct containing a fixed size array which is initialized using a repeat expression, and when the element to be repeated provided to the repeat expression is another constant which is of a zero-sized type. The fix works by looking for constants and associated constants which are zero-width and consequently contain no data, but for which rustc is still attempting to emit an LLVM value; it simply stops rustc from attempting to emit anything. By my logic, this should work fine since the only values that are emitted in this case (according to the comments) are for closures with side effects, and constants will never have side effects, so it's fine to simply get rid of them. It fixes the error and things compile fine with it, but I have a sneaking suspicion that it could be done in a far better manner.\n\nr? @nikomatsakis","distinct":false,"url":"https://api.github.com/repos/rust-lang/rust/commits/f511b21dbabfee44f3f69f4e9bcc7939c0ae72eb"}]}